/* Tips (poni.web.id/tips/): the list page and the articles, built by scripts/tips.mjs. Loaded after home.css,
   which brings the colours, buttons, navbar, the closing card and the footer. Direction: DESIGN.md, filtered by
   antislop. Design read: a tips library for people who use Poni and people who arrive from a search or the bio
   link, in poni.web.id's dark notch language. Dial: ENERGY 1 / RHYTHM 2 / MOTION 1.

   Why it looks like this:
   - Left-aligned page head, smaller than the home hero: this is a page to read and pick from, not to be greeted by.
   - Every picture is a real Poni shot hanging from the top edge of the grey desk (the Dock sits on the bottom):
     the site's own motif, so a tip is recognised as "something on your screen" before the title is read.
   - The newest tip is one large row; the rest are equal items because they are peers that people scan and compare.
     No boxes around them: the desk picture is the card, the text sits on the page.
   - Green stays where DESIGN.md puts it (links, focus ring, the heading's punctuation). The chosen topic is white,
     like the chosen system on the home's install tabs.
   - Motion: hover and press only. Nothing moves by itself. */

/* ---------------------------------------------------------------- page head */
.tips-head { padding: 64px 0 0; }
.tips-head h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.05em; }
.tips-head h1 .h1-2 { display: block; color: var(--muted); font-size: .5em; letter-spacing: -.035em; line-height: 1.15; margin-top: .3em; }
.tips-head .lead { margin-top: 22px; max-width: 620px; color: var(--dim); font-size: 18px; }

/* ---------------------------------------------------------------- the picture: a desk, the notch hanging from its top */
.shot { margin: 0; background: var(--desk); border-radius: 18px; overflow: hidden; outline: 1px solid transparent; outline-offset: -1px; transition: outline-color .15s; }
.shot img { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- the newest tip */
.tip-top { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; margin-top: 48px; }
.tip-top .when { font-size: 14.5px; font-weight: 700; color: var(--dim); }
.tip-top h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.035em; margin-top: 10px; }
.tip-top p.sum { color: var(--dim); margin-top: 14px; max-width: 460px; }
.tip-top .meta { margin-top: 18px; }

/* a tip is one link: its title, stretched over the picture and the text */
.tip a.go { color: var(--text); text-decoration: none; }
.tip a.go::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.tip a.go:focus-visible { outline: none; }
.tip:has(a.go:focus-visible) { outline: 2px solid var(--em-2); outline-offset: 6px; border-radius: 20px; }
.tip:hover a.go { color: var(--em-2); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tip:hover .shot { outline-color: #5a5a5a; }
.tip:active .shot { transform: translateY(1px); }

.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 14.5px; color: var(--muted); list-style: none; }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta i { color: var(--dim); font-size: 13.5px; }

/* ---------------------------------------------------------------- topics */
.topics { margin-top: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topics h2 { font-size: 15px; font-weight: 700; color: var(--dim); margin-right: 8px; }
.topics button {
  min-height: 44px; padding: 0 17px; border-radius: 999px; border: 1.5px solid #383838; background: transparent;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; transition: background-color .15s, border-color .15s, color .15s;
}
.topics button:hover { background: var(--chip); border-color: #4f4f4f; }
.topics button:active { transform: translateY(1px); }
.topics button[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--ink); }
.tips-count { margin-top: 14px; font-size: 14.5px; color: var(--muted); }

/* ---------------------------------------------------------------- the list */
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; margin-top: 28px; list-style: none; }
.tips-grid .tip { position: relative; }
.tips-grid h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.015em; margin-top: 16px; }
.tips-grid p.sum { color: var(--dim); font-size: 15.5px; line-height: 1.55; margin-top: 7px; }
.tips-grid .meta { margin-top: 12px; }
[hidden] { display: none !important; }
.tips-none { margin-top: 28px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; color: var(--dim); }
.tips-none button { background: none; border: 0; padding: 0; font: inherit; color: var(--em-2); text-decoration: underline; text-underline-offset: 3px; }
.tips-none button:hover { color: #6ee7b7; }

.tips-end { padding: 96px 0 0; }
.tips-end .cta-old { padding: 0 0 20px; }

/* ---------------------------------------------------------------- the article */
.crumb { padding-top: 28px; font-size: 14.5px; color: var(--muted); }
.crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumb li + li::before { content: "/"; margin-right: 8px; color: #5a5a5a; }
.crumb li { display: inline-flex; align-items: center; }
.crumb a { color: var(--dim); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.crumb a:hover { color: var(--text); text-decoration: underline; }

.art-head { padding-top: 6px; max-width: 860px; }
.art-head h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.045em; }
.art-head .lead { margin-top: 20px; color: var(--dim); font-size: 19px; max-width: 700px; }
.art-head .meta { margin-top: 18px; }
.art-head .byline { margin-top: 16px; font-size: 14.5px; color: var(--dim); }
.art-head .byline + .meta { margin-top: 8px; }

.art { display: grid; grid-template-columns: minmax(0, 720px) 300px; gap: 64px; align-items: start; margin-top: 40px; }
/* an article without a video: one centred reading column, so the right side doesn't stand empty */
.no-side .crumb, .no-side .art-head, .no-side .art { max-width: 760px; margin-left: auto; margin-right: auto; }
.no-side .art { grid-template-columns: minmax(0, 1fr); }
.art-body > :first-child { margin-top: 0; }
.art-body > .shot { margin-top: 20px; }
/* two small pictures side by side */
.shots-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.art-body figcaption { padding: 11px 16px 13px; font-size: 14.5px; color: #dadada; background: var(--desk); }
.art-body h2 { font-size: clamp(23px, 2.6vw, 29px); letter-spacing: -.03em; line-height: 1.15; margin-top: 56px; }
.art-body h2 + p, .art-body h2 + ol, .art-body h2 + ul { margin-top: 16px; }
.art-body p { color: #dadada; }
.art-body p + p, .art-body .shot + p, .art-body .shots-2 + p, .art-body ol + p, .art-body ul + p { margin-top: 14px; }
.art-body ol + p, .art-body ul + p { margin-top: 18px; }
.art-body ul.plain { list-style: none; }
.art-body ul.plain li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--dim); }
.art-body ul.plain li:last-child { border-bottom: 1px solid var(--line); }
.art-body ul.plain b { color: var(--text); }

/* steps: numbered because the order matters; plain numerals, no badges */
.steps { list-style: none; counter-reset: langkah; }
.steps > li { counter-increment: langkah; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 22px 0; border-top: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(langkah); grid-column: 1; grid-row: 1; font-weight: 800; font-size: 19px; line-height: 1.35; color: var(--muted); }
.steps > li > * { grid-column: 2; min-width: 0; }
.steps h3 { font-size: 19px; line-height: 1.35; letter-spacing: -.015em; }
.steps p { margin-top: 6px; color: var(--dim); }
.steps .shot { margin-top: 16px; }

.note { margin-top: 28px; padding: 20px 22px; border: 1px solid #2c2c2c; border-radius: 18px; color: var(--dim); }
.note b { color: var(--text); }
.note i { color: var(--text); margin-right: 6px; }

.art-side { position: sticky; top: 96px; }
.art-side h2 { font-size: 15px; font-weight: 700; color: var(--dim); margin-bottom: 12px; }
.art-side video { display: block; width: 100%; height: auto; border-radius: 18px; background: #000; }
.art-side p { margin-top: 12px; font-size: 14.5px; color: var(--muted); }

.more { margin-top: 96px; }
.more > h2 { font-size: clamp(23px, 2.6vw, 29px); letter-spacing: -.03em; }
.more .all { margin-top: 32px; font-weight: 700; font-size: 15.5px; }

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1040px) {
  .art { grid-template-columns: minmax(0, 720px); gap: 48px; }
  .art-side { position: static; max-width: 300px; }
}
@media (max-width: 900px) {
  .tip-top { grid-template-columns: 1fr; gap: 20px; }
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .tips-head { padding-top: 40px; }
  .tips-head .lead { font-size: 17px; }
  /* one row that scrolls sideways, out to the screen's edges (the page gutter is 16px on phones) */
  .topics { margin-top: 56px; flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 4px 16px; scrollbar-width: none; }
  .topics::-webkit-scrollbar { display: none; }
  .topics button { flex: none; }
  .topics h2 { flex: none; }
  .tips-grid { grid-template-columns: 1fr; gap: 40px; }
  .shots-2 { grid-template-columns: 1fr; }
  .steps > li { grid-template-columns: 28px minmax(0, 1fr); }
  .art-head .lead { font-size: 17.5px; }
  .tips-end { padding-top: 72px; }
  .more { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot, .topics button { transition: none; }
}

.art-body .more-guide { margin-top: 28px; }
