/* AppSift Web. A store front on warm paper, set like a catalogue: one type
   scale, ink for anything you press, one vermilion accent that means "price
   drop", green that means "free" or "good". Filters sit in a quiet sidebar
   (a drawer on phones); apps are cards that all share one shape. */
:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --sunken: #ecebe5;
  --fg: #191816;
  --muted: #68655e;
  --faint: #99958c;
  --line: #e2dfd7;
  --line-strong: #c9c5bb;
  --ink: #191816;
  --on-ink: #ffffff;
  --accent: #d6461a;
  --accent-soft: #fbe8df;
  --on-accent: #ffffff;
  --good: #137a4b;
  --good-soft: #e1f2e8;
  --drop: #d6461a;
  --rise: #b42318;
  --star: #d9930a;
  --shadow: 0 1px 2px rgba(25, 24, 22, .05), 0 6px 20px rgba(25, 24, 22, .05);
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;   /* cards and panels */
  --radius-s: 9px;  /* controls */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368655e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2399958c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412; --surface: #1d1c1a; --sunken: #292825; --fg: #f1efea; --muted: #aaa69e; --faint: #7a766e;
    --line: #2f2e2a; --line-strong: #46443f; --ink: #f1efea; --on-ink: #141412; --accent: #ff7a4d; --accent-soft: #3a2015; --on-accent: #1a0c06;
    --good: #52c98c; --good-soft: #16301f; --drop: #ff7a4d; --rise: #f2786d; --star: #f1b640;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .3);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa69e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); }
body.drawer { overflow: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--fg); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--fg) 55%, transparent); outline-offset: 2px; }
/* Menus and boxes show focus with their own border, not a ring. */
select:focus-visible, input:not([type="radio"]):focus-visible { outline: none; border-color: var(--fg) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }
select { appearance: none; -webkit-appearance: none; background: var(--surface) var(--select-arrow) no-repeat right 10px center / 14px; padding-right: 30px; cursor: pointer; }

/* Header: the name, text tabs with an ink underline, and one ink button. */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid var(--line); }
.bar-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: stretch; gap: 32px; }
.brand { align-self: center; font: 700 21px/1 var(--display); color: var(--fg); text-decoration: none; letter-spacing: -0.03em; display: inline-flex; align-items: flex-end; gap: 2px; }
.brand i { width: 6px; height: 6px; border-radius: 1.5px; background: var(--accent); margin-bottom: 2px; }
.tabs { display: flex; gap: 22px; }
.tab { background: none; border: 0; padding: 0 2px; color: var(--muted); font-weight: 500; font-size: 14.5px; cursor: pointer; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
.tab:hover { color: var(--fg); }
.tab[aria-pressed="true"] { color: var(--fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.bar-end { margin-left: auto; align-self: center; display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 36px; height: 36px; border-radius: var(--radius-s); border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.iconbtn:hover { background: var(--sunken); color: var(--fg); }
.storepick { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding-left: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); }
.storepick .ico { width: 15px; height: 15px; }
.storepick select { border: 0; background-color: transparent; height: 34px; font-size: 13.5px; color: var(--fg); padding-left: 4px; }
.get { display: inline-flex; align-items: center; height: 36px; background: var(--ink); color: var(--on-ink); text-decoration: none; font-weight: 600; font-size: 13.5px; padding: 0 14px; border-radius: var(--radius-s); white-space: nowrap; }
.get:hover { background: color-mix(in srgb, var(--ink) 84%, var(--accent)); }
.get.big { height: 44px; font-size: 15px; padding: 0 20px; border-radius: 11px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 32px 24px 72px; display: grid; gap: 40px; }

/* Sidebar layout: Apps, Charts, Price drops. The sidebar is secondary:
   smaller type, no icons, controls that sit back. */
.layout { display: grid; grid-template-columns: 204px minmax(0, 1fr); gap: 56px; align-items: start; }
.main { display: grid; gap: 16px; min-width: 0; align-content: start; }
.side { position: sticky; top: 78px; max-height: calc(100vh - 94px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 8px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.side-head h2 { font: 600 12px/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.side-head .linkbtn { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.side-head .linkbtn:hover { color: var(--fg); }
.pillbtn.side-done { display: none; }
.fpanel { display: grid; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; font-weight: 500; font-size: 13.5px; color: var(--fg); user-select: none; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary > .ico:not(.chev) { display: none; }
.fgroup summary .chev { margin-left: auto; width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
.fgroup[open] summary .chev { transform: rotate(90deg); }
.fgroup.set summary > span::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: 2px; }
.fbody { padding: 0 0 14px; }
.fbody select, .fbody input:not([type="radio"]) { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding-left: 10px; font-size: 13.5px; color: var(--fg); background-color: var(--surface); }
.fbody input:not([type="radio"]) { padding-right: 10px; }
.fbody select:hover, .fbody input:hover { border-color: var(--line-strong); }
.radios { display: grid; gap: 2px; }
.radio { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.radio:has(input:checked) { color: var(--fg); font-weight: 500; }
.radio input { appearance: none; -webkit-appearance: none; margin: 0; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); flex: none; cursor: pointer; transition: border-width .1s; }
.radio input:checked { border: 5px solid var(--ink); }
.fpanel .why { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 8px 10px; }
.fpanel .hint { margin: 0; padding: 14px 0; font-size: 12.5px; color: var(--muted); }
.scrim { position: fixed; inset: 0; background: rgba(10, 10, 9, .4); z-index: 29; }

/* Search: one line of what this is, the search box, then the controls. */
.hero { display: grid; gap: 6px; padding-top: 4px; }
.eyebrow { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.hero h1 { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -0.025em; line-height: 1.12; }
.hero h1 span { color: inherit; }
.promises { list-style: none; margin: 2px 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--muted); font-size: 14px; }
.promises li { white-space: nowrap; }
.promises li + li::before { content: "·"; margin-right: 8px; color: var(--faint); }
.searchbox { position: relative; }
.searchbox input { width: 100%; height: 50px; font-size: 16.5px; padding: 0 48px 0 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface) var(--search-icon) no-repeat 16px center / 20px; box-shadow: var(--shadow); }
.searchbox input::placeholder { color: var(--faint); }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchbox input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.clearq { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--sunken); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.clearq:hover { color: var(--fg); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .spacer { flex: 1; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; gap: 2px; background: var(--sunken); border-radius: var(--radius-s); padding: 3px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0 11px; height: 30px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button .ico { width: 15px; height: 15px; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.sortpick { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.sortpick select, .store select { height: 36px; border: 1px solid var(--line); border-radius: var(--radius-s); padding-left: 10px; font-size: 13.5px; color: var(--fg); }
.sortpick select:hover { border-color: var(--line-strong); }
.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.viewtoggle button { width: 36px; height: 34px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.viewtoggle button + button { border-left: 1px solid var(--line); }
.viewtoggle button:hover { color: var(--fg); }
.viewtoggle button[aria-pressed="true"] { background: var(--sunken); color: var(--fg); }
.pillbtn.filters-open { display: none; }
.pillbtn.filters-open .ico { width: 16px; height: 16px; color: var(--muted); }
.side-hide { font-size: 13px; color: var(--muted); text-decoration: none; }
.side-hide:hover { color: var(--fg); }
@media (min-width: 1101px) {
  /* Shown only while the sidebar is hidden: the way to bring it back. */
  body.filters-hidden .pillbtn.filters-open { display: inline-flex; }
  body.filters-hidden .layout { grid-template-columns: minmax(0, 1fr); }
  body.filters-hidden .layout > .side { display: none; }
}
.filter input { height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 0 10px; font-size: 13.5px; width: 170px; max-width: 100%; }
.status { margin: 0; color: var(--fg); font: 700 16px/1.4 var(--display); letter-spacing: -0.01em; min-height: 1.4em; padding-top: 6px; }
.main > .status:empty { min-height: 0; padding: 0; margin-top: -16px; }
.section-head { display: grid; gap: 4px; }
.section-head .eyebrow { margin-bottom: 2px; }
.section-head h1 { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -0.025em; line-height: 1.12; }
.section-head p { margin: 0; max-width: 64ch; }
.section-head p.muted { font-size: 15px; }

/* Cards: one shape everywhere. Icon, two lines of title, developer, then
   two short fact lines and a screenshot strip. Nothing else competes. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 16px; }
.card { position: relative; display: grid; gap: 5px; align-content: start; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "l1" "l2" "preview"; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.cards .card:not(.skeleton):hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card:has(.cardlink:focus-visible) { outline: 2px solid color-mix(in srgb, var(--fg) 55%, transparent); outline-offset: 2px; }
.card-head { grid-area: head; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-bottom: 6px; }
.card-head .icon { width: 52px; height: 52px; }
.card .l1 { grid-area: l1; } .card .l2 { grid-area: l2; }
.icon { width: 60px; height: 60px; border-radius: 22%; background: var(--sunken); object-fit: cover; border: 1px solid var(--line); }
.icon.mac { border-radius: 18%; }
.titles { display: grid; gap: 2px; min-width: 0; }
/* Two lines of title space on every card, so everything below lines up. */
.card h3 { font: 600 15px/1.35 var(--body); letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.cardlink { color: inherit; text-decoration: none; outline: none; }
.cardlink::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .dev { font-size: 13px; line-height: 18px; min-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save { position: relative; z-index: 1; width: 30px; height: 30px; margin: -4px -6px 0 0; border-radius: 8px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.save .ico { width: 16px; height: 16px; }
.save:hover { color: var(--fg); background: var(--sunken); }
.save[aria-pressed="true"] { color: var(--accent); }
.save[aria-pressed="true"] .ico { fill: currentColor; }
.card .line { display: flex; align-items: center; gap: 10px; min-height: 22px; white-space: nowrap; overflow: hidden; font-size: 13px; }
.card .line > .rating, .card .line > .model { display: inline-flex; align-items: center; min-width: 0; }
.card .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.note.push { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.blurb { grid-area: blurb; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.preview { grid-area: preview; position: relative; height: 116px; margin-top: 8px; display: flex; gap: 4px; overflow: hidden; border-radius: 8px; background: var(--sunken); }
.preview img { height: 100%; width: auto; max-width: none; flex: none; border-radius: 6px; object-fit: cover; background: var(--sunken); }
.price { font: 600 12.5px/1 var(--mono); background: var(--sunken); padding: 6px 8px; border-radius: 7px; }
.price.free { color: var(--good); background: var(--good-soft); }
.starline { display: inline-flex; align-items: baseline; gap: 4px; }
.starline .star { color: var(--star); font-size: 13px; }
.starline b { font-weight: 600; font-size: 13px; }
.count { color: var(--muted); font-size: 12.5px; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 12px; }
.note { font-size: 12.5px; color: var(--muted); }
.cut { font: 700 12px/1 var(--mono); color: var(--on-accent); background: var(--accent); padding: 5px 6px; border-radius: 6px; }
.was { color: var(--muted); text-decoration: line-through; font: 500 12px/1 var(--mono); }
.empty { color: var(--muted); padding: 30px 0; text-align: center; grid-column: 1 / -1; }
.rank { font: 500 13px/1 var(--mono); color: var(--muted); }
/* In a card, price and model as quiet text: a coloured price, a dot for the model. */
.cards .card .price { background: none; padding: 0; font-size: 13px; }
.cards .card .line .tag { background: none; padding: 0; font: 500 12.5px/1.2 var(--body); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.cards .card .line .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.cards .card .line .tag.good::before { background: var(--good); }
.cards .card .line .tag.warn::before { background: var(--rise); }
body:not([data-layout="list"]) .cards .blurb, body:not([data-layout="list"]) .cards .cat { display: none; }

/* List layout: one row per app, with the blurb and a strip of screenshots. */
body[data-layout="list"] .grid.cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
body[data-layout="list"] .cards .card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) 232px; grid-template-areas: "head blurb preview" "l1 blurb preview" "l2 blurb preview"; column-gap: 28px; row-gap: 4px; padding: 14px 16px; }
body[data-layout="list"] .cards .card h3 { min-height: 0; }
body[data-layout="list"] .cards .blurb { -webkit-line-clamp: 3; min-height: 0; align-self: center; }
body[data-layout="list"] .cards .preview { height: 100px; margin: 0; align-self: center; }

/* App page */
.back { background: none; border: 0; color: var(--muted); padding: 0; font-weight: 500; cursor: pointer; justify-self: start; }
.back:hover { color: var(--fg); }
.app { display: grid; gap: 24px; }
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.app-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; }
.app-head .icon { width: 112px; height: 112px; }
.app-head h1 { font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -0.025em; line-height: 1.12; }
.app-head .dev { color: var(--muted); }
.app-head .devlink { color: var(--muted); margin-top: 2px; }
.app-head .devlink:hover { color: var(--fg); }
.app-head .row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.facts span { display: grid; gap: 1px; }
.facts b { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: grid; gap: 12px; min-width: 0; }
.panel h2 { font-size: 17px; letter-spacing: -0.015em; }
.panel .sub { margin: 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.panel .get { background: none; color: var(--fg); border: 1px solid var(--line-strong); }
.panel .get:hover { background: var(--sunken); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); }
.chart .axis { fill: var(--muted); font: 11px var(--mono); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .area { fill: var(--accent-soft); }
.chart .dot { fill: var(--accent); }
.chart .now { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.history { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 12.5px var(--mono); color: var(--muted); }
.shots { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.shots img { height: 300px; width: auto; max-width: none; border-radius: 10px; border: 1px solid var(--line); scroll-snap-align: start; background: var(--sunken); }
.shots.mac img { height: 220px; }
.desc { white-space: pre-line; font-size: 15px; line-height: 1.55; max-width: 72ch; max-height: 14em; overflow: hidden; position: relative; }
.desc.open { max-height: none; }
.linkbtn { background: none; border: 0; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; padding: 0; font-weight: 500; cursor: pointer; justify-self: start; }
.linkbtn:hover { color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.world { display: grid; gap: 0; }
.wrow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wrow:last-child { border-bottom: 0; }
.wrow.here { font-weight: 600; }
.wrow .mono { font-family: var(--mono); font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: end; }
.tag { font: 600 11px/1 var(--body); padding: 4px 6px; border-radius: 5px; background: var(--sunken); color: var(--muted); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: color-mix(in srgb, var(--rise) 14%, transparent); color: var(--rise); }
.wrow .tag { margin-left: 6px; }
.panel h2 .tag { vertical-align: middle; margin-left: 4px; }
.iaps { display: grid; }
.iap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.iap:last-child { border-bottom: 0; padding-bottom: 0; }
.iap-name { display: grid; gap: 5px; min-width: 0; }
.iap-name b { font-weight: 600; }
.iap-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.iap-tags .tag { white-space: nowrap; }
.iap-price { display: grid; justify-items: end; align-content: start; gap: 2px; text-align: right; }
.iap-price .mono { font: 600 14px var(--mono); white-space: nowrap; }
.iap-price .per { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.reviews { display: grid; gap: 14px; }
.review { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); max-width: 72ch; }
.review:last-child { border-bottom: 0; padding-bottom: 0; }
.review p { margin: 0; font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }

.badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 11px/16px var(--body); text-align: center; vertical-align: 1px; }
.card .top { display: flex; gap: 8px; align-items: baseline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pillbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-s); padding: 0 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pillbtn:hover { background: var(--sunken); }
.pillbtn[aria-pressed="true"] { border-color: var(--ink); color: var(--on-ink); background: var(--ink); }
.pillbtn:disabled { opacity: 0.5; cursor: default; }
.devlink { background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; font: inherit; text-align: left; }
.change { font-size: 12.5px; font-weight: 600; }
.change.down { color: var(--good); } .change.up { color: var(--rise); } .change.same { color: var(--muted); font-weight: 500; }
.fineprint { margin: 0; font-size: 13px; color: var(--muted); max-width: 70ch; }
.tray { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 6; background: var(--ink); color: var(--on-ink); text-decoration: none; font-weight: 600; padding: 11px 18px; border-radius: 11px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.table-wrap { overflow-x: auto; }
.ctable { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ctable th, .ctable td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
.ctable th[scope="row"] { color: var(--muted); font-weight: 500; width: 150px; }
.ctable tr:last-child th, .ctable tr:last-child td { border-bottom: 0; }
.ctable .head-cell { display: grid; gap: 6px; }
.ctable .head-cell img { width: 52px; height: 52px; }
.ctable .best { color: var(--good); font-weight: 600; }
.devgroup { display: grid; gap: 14px; }
.devgroup h2 { font-size: 19px; letter-spacing: -0.02em; }
#watch .card { grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: none; gap: 12px; }
#watch .card h3 { font-size: 15px; min-height: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); color: var(--fg); background: var(--surface); border-radius: 999px; padding: 5px 7px 5px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.chip span { font-size: 15px; line-height: 1; color: var(--muted); }
.chip:hover { background: var(--sunken); }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.suggest .note { font-size: 13.5px; margin-right: 4px; }
.chip.try { padding-right: 12px; color: var(--muted); border-color: transparent; background: var(--sunken); }
.chip.try:hover { color: var(--fg); }
.chip.clear { color: var(--muted); background: none; border-style: dashed; padding-right: 12px; }

.more { display: grid; justify-items: center; gap: 8px; padding-top: 8px; }
.grid > .more { grid-column: 1 / -1; }
.more:empty { display: none; }

.cmp-iaps { display: grid; gap: 6px; }
.cmp-iap { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13px; }
.cmp-iap .name { font-weight: 500; }
.cmp-iap .mono { font-family: var(--mono); color: var(--muted); }

/* Loading placeholders */
.card.skeleton { pointer-events: none; }
.sk { display: block; background: var(--sunken); border-radius: 6px; }
.icon.sk { border: 0; }
.sk-title { display: grid; gap: 6px; min-height: 2.7em; align-content: start; padding-top: 2px; }
.sk-bar { height: 12px; }
.blurb .sk-bar { height: 10px; margin-top: 5px; }
.dev .sk-bar { height: 10px; margin-top: 4px; }
.sk-pill { height: 20px; border-radius: 7px; }
.preview.sk { border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .sk { background: linear-gradient(90deg, var(--sunken) 0%, var(--line) 50%, var(--sunken) 100%); background-size: 200% 100%; animation: sk-shimmer 1.3s ease-in-out infinite; }
  @keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
}

/* Pitch for the Mac app: one ink block, one button. */
.pitch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 32px; align-items: center; padding: 28px 32px; border-radius: 16px; background: var(--ink); color: var(--on-ink); }
.pitch h2 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; }
.pitch p { margin: 6px 0 0; max-width: 58ch; color: color-mix(in srgb, var(--on-ink) 72%, transparent); }
.pitch .get.big { background: var(--on-ink); color: var(--ink); }
.pitch .get.big:hover { background: color-mix(in srgb, var(--on-ink) 90%, var(--ink)); }
.pitch-cta { display: grid; justify-items: center; gap: 8px; }
.pitch .fine { margin: 0; font-size: 12.5px; color: color-mix(in srgb, var(--on-ink) 55%, transparent); }

@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 90vw); max-height: none; padding: 0 20px 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, .25); z-index: 30; transform: translateX(-104%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; }
  .side.open { transform: none; visibility: visible; transition: transform .22s ease; }
  .side-head { background: var(--surface); padding: 14px 0 10px; }
  .side-head h2 { font: 700 17px/1.3 var(--display); letter-spacing: -0.015em; text-transform: none; color: var(--fg); }
  .pillbtn.side-done { display: inline-flex; height: 32px; }
  .side-hide { display: none; }
  .pillbtn.filters-open { display: inline-flex; }
  body[data-layout="list"] .cards .card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 190px; }
}
@media (max-width: 860px) {
  .bar-inner { height: auto; padding: 10px 16px 0; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
  .brand { align-self: auto; }
  .bar-end { align-self: auto; }
  .tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; gap: 20px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 8px 2px 10px; }
  .wrap { padding: 20px 16px 56px; gap: 28px; }
  .hero h1 { font-size: 24px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  /* The icon beside the title and buttons; the facts take the full width below. */
  .app-head { grid-template-columns: 76px minmax(0, 1fr); gap: 4px 16px; }
  .app-head > div { display: contents; }
  .app-head .icon { width: 76px; height: 76px; grid-row: span 4; }
  .app-head .devlink { margin-top: 0; }
  .facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px 16px; margin-top: 14px; }
  .panel { padding: 18px; }
  .shots img { height: 240px; }
  .shots.mac img { height: 160px; }
  .pitch { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .pitch-cta { justify-items: start; }
  body[data-layout="list"] .cards .card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "l1" "l2"; }
  body[data-layout="list"] .cards .blurb, body[data-layout="list"] .cards .preview { display: none; }
}
@media (max-width: 560px) {
  .iconbtn, .get .wide, .storepick .ico, .hero .eyebrow { display: none; }
  .brand { font-size: 20px; }
  .bar-end { gap: 6px; flex-wrap: nowrap; }
  .storepick { padding-left: 6px; }
  .storepick select { max-width: 118px; }
  .get { padding: 0 12px; }
  .searchbox input { height: 48px; font-size: 16px; }
  .seg { flex: 1; }
  .seg button { flex: 1; justify-content: center; padding: 0 8px; }
  .sortpick > span { display: none; }
  .toolbar .spacer { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .tabs { gap: 16px; } }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; max-width: 640px; }
.contact label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--fg); }
.contact .opt { color: var(--muted); font-weight: 400; }
.contact .wide { grid-column: 1 / -1; }
.contact input, .contact select, .contact textarea { width: 100%; border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background-color: var(--surface); padding: 10px 12px; font-size: 15px; color: var(--fg); }
.contact input, .contact select { height: 42px; padding-block: 0; }
.contact select { padding-right: 32px; }
.contact textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.contact .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact .send { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.contact .send .get { border: 0; cursor: pointer; }
.contact .send .get:disabled { opacity: .55; cursor: default; }
.contact .send .status { font-size: 14px; font-weight: 500; }
.contact .sent { grid-column: 1 / -1; display: grid; gap: 6px; padding: 24px 0; }
.contact .sent h2 { font-size: 22px; }
.contact .sent p { margin: 0; }
@media (max-width: 560px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-inner { max-width: 1320px; margin: 0 auto; padding: 22px 24px 34px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 13px; color: var(--muted); }
.foot a { color: var(--fg); text-decoration: none; font-weight: 500; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot .muted { margin-left: auto; }
@media (max-width: 560px) { .foot .muted { margin-left: 0; } }

/* An image that still failed after its retries: keep the box, drop the broken-image glyph. */
img.failed { opacity: 0; }
