/* ios.app.promptugal.news: one stylesheet, no web fonts, no scripts.
   Colours come from the app icon (ink, red, green on paper) and the app's
   AccentColor asset (#AD222B light, #FF868A dark). */

:root {
  --paper: #f5f1ea;
  --paper-2: #ebe5da;
  --card: #fffdf9;
  --ink: #111318;
  --muted: #555a63;
  --rule: #d6cfc2;
  --red: #ad222b;
  --green: #0b6b1e;
  --device: #1d1f24;
  --shadow: 0 18px 40px -18px rgb(17 19 24 / 0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161b;
    --paper-2: #1c1f25;
    --card: #1f2229;
    --ink: #ece7de;
    --muted: #a7abb3;
    --rule: #343842;
    --red: #ff868a;
    --green: #6fcf7f;
    --device: #000;
    --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #14161b; --paper-2: #1c1f25; --card: #1f2229; --ink: #ece7de; --muted: #a7abb3;
  --rule: #343842; --red: #ff868a; --green: #6fcf7f; --device: #000;
  --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.8); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--red); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 2px; }

code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; line-height: 1.5;
}
pre code { background: none; padding: 0; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); margin: 0 0 0.35em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 0.5em; }
h3 { font-size: 1.25rem; margin: 0 0 0.35em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 2; }
.skip:focus { left: 16px; }

/* Masthead: a newspaper rule in the brand's green, as under ".news" on the icon */
.masthead { border-bottom: 3px solid var(--green); background: var(--paper); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.3rem/1 var(--serif); }
.brand img { border-radius: 8px; border: 1px solid var(--rule); }
.brand em { color: var(--red); font-weight: 400; }
.masthead nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-size: 0.95rem; }
.masthead nav a { color: var(--ink); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { border-bottom-color: var(--red); }
.version {
  font: 600 0.78rem/1 var(--mono); color: var(--green); border: 1px solid currentColor;
  border-radius: 999px; padding: 5px 9px;
}

/* Sections */
.band { padding-block: clamp(48px, 8vw, 88px); border-bottom: 1px solid var(--rule); }
.band-alt { background: var(--paper-2); }
.kicker { font: 700 0.78rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin: 0 0 12px; }
.lede { font: 1.25rem/1.5 var(--serif); color: var(--muted); max-width: 36em; margin: 0 0 1.4em; }
.prose { max-width: 44em; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child, .prose .kicker + h2 { margin-top: 0; }
.muted { color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 em { color: var(--red); font-style: italic; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.button {
  display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
}
.button:hover { background: var(--red); border-color: var(--red); }
.button-ghost { background: transparent; color: var(--ink); }
.button-ghost:hover { color: var(--paper); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0; list-style: none; font-size: 0.92rem; color: var(--muted); }
.facts li::before { content: "■ "; color: var(--green); font-size: 0.7em; vertical-align: 0.15em; }

/* The iPad mock-up: drawn from Websites.json, decorative only */
.device {
  background: var(--device); border-radius: 26px; padding: 12px; box-shadow: var(--shadow);
  aspect-ratio: 4 / 3; max-width: 100%;
}
.screen { display: grid; grid-template-columns: 38% 1fr; height: 100%; border-radius: 16px; overflow: hidden; background: var(--card); }
.sidebar { background: var(--paper-2); padding: 16px 10px; border-right: 1px solid var(--rule); min-width: 0; }
.sidebar-title { font: 700 1rem/1.2 var(--sans); margin: 0 6px 10px; }
.sidebar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.sidebar-list li { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 9px; font-size: clamp(0.62rem, 1.15vw, 0.82rem); line-height: 1.2; min-width: 0; }
.sidebar-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-list li[aria-current] { background: var(--card); box-shadow: 0 1px 0 var(--rule); font-weight: 600; }
.sidebar-list .badge { width: clamp(20px, 2.6vw, 30px); height: clamp(20px, 2.6vw, 30px); font-size: clamp(0.32rem, 0.6vw, 0.45rem); }
.page-mock { padding: clamp(10px, 2vw, 22px); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.page-mock .mast { font: 700 clamp(0.9rem, 2vw, 1.5rem)/1 var(--serif); border-bottom: 2px solid var(--green); padding-bottom: 8px; }
.page-mock .mast b { color: var(--red); }
.page-mock .head { font: 700 clamp(0.72rem, 1.4vw, 1.05rem)/1.25 var(--serif); }
.line { height: 7px; border-radius: 4px; background: var(--rule); }
.line.short { width: 60%; }
.page-mock .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.page-mock .tile { aspect-ratio: 4 / 3; border-radius: 8px; background: linear-gradient(135deg, var(--paper-2), var(--rule)); }
.page-mock .tile:first-child { background: linear-gradient(135deg, var(--red), #e8870e); opacity: 0.85; }
.page-mock .bar { margin-top: auto; display: flex; justify-content: space-around; border-top: 1px solid var(--rule); padding-top: 8px; color: var(--muted); font-size: clamp(0.5rem, 1vw, 0.75rem); }

/* Shortcut badges, as the app's sidebar draws them */
.badge { width: 40px; height: 40px; border-radius: 9px; flex: none; object-fit: cover; }
.badge-text {
  display: inline-grid; place-items: center; text-align: center; background: var(--tint); color: #fff;
  font: 800 0.56rem/1.05 var(--sans); letter-spacing: -0.01em; overflow: hidden;
}

/* Two ways to read */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(20px, 3vw, 30px); }
.card h3 { display: flex; align-items: baseline; gap: 10px; }
.card .num { font: 700 0.8rem/1 var(--mono); color: var(--green); }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 16px 0 0; list-style: none; }
.tabs li { border-top: 2px solid var(--red); padding-top: 8px; font-size: 0.95rem; }
.tabs strong { display: block; font-family: var(--serif); font-size: 1.05rem; }

/* Websites list */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.site-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.site-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); font: 600 1.05rem/1.3 var(--sans); min-width: 0; }
.site-list a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.site-list a:hover { color: var(--red); }

/* Numbers counted from the source at build time */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 3px solid var(--ink); }
.stats div { padding: 18px 16px 4px 0; border-right: 1px solid var(--rule); }
.stats div:last-child { border-right: 0; }
.stats dt { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1 var(--serif); color: var(--ink); }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }

.notice { border-left: 4px solid var(--red); background: var(--card); padding: 14px 18px; border-radius: 0 10px 10px 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 0.85rem/1 var(--mono);
}

dl.qa dt { font: 700 1.1rem/1.3 var(--serif); margin-top: 1.2em; }
dl.qa dd { margin: 0.3em 0 0; }

/* Footer */
.colophon { padding-block: 36px 48px; font-size: 0.9rem; color: var(--muted); }
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.colophon p { margin: 0; }
.colophon strong { color: var(--ink); }

@media (max-width: 860px) {
  .hero, .pair, .split { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(2) { border-right: 0; }
  .colophon-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .device { border-radius: 18px; padding: 8px; }
  .screen { border-radius: 11px; }
  .tabs { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .site-list a, a { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
}

/* Developer area and briefs */
.packs { display: grid; gap: 20px; margin-top: 24px; }
.pack h3 a { color: var(--ink); text-decoration: none; }
.pack h3 a:hover { color: var(--red); }
.brief-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.brief-list a { font-weight: 600; }
.brief-list span { display: block; color: var(--muted); font-size: 0.92rem; }
.brief { max-width: 50em; }
.brief h1 { font-size: clamp(2rem, 5vw, 3rem); }
.brief h2 { margin-top: 1.8em; padding-top: 0.6em; border-top: 1px solid var(--rule); }
.brief h3 { margin-top: 1.4em; }
.brief li { margin-bottom: 0.35em; }
.brief blockquote { margin: 0 0 1.4em; padding: 4px 0 4px 18px; border-left: 4px solid var(--red); font: 1.2rem/1.5 var(--serif); color: var(--muted); }
.brief blockquote p { margin: 0.4em 0; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 0.92rem; line-height: 1.45; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.table-wrap th { background: var(--paper-2); font-weight: 700; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.brief hr { border: 0; border-top: 3px solid var(--green); margin: 2em 0; }

/* Features: status is worked out from the files at build time */
.features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; }
.feature h3 { font-size: 1.15rem; }
.feature p { margin: 0 0 10px; }
.feature .tags { margin-top: auto; margin-bottom: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.status, .kind { font: 600 0.75rem/1 var(--mono); border-radius: 999px; padding: 5px 9px; border: 1px solid currentColor; white-space: nowrap; }
.status.on { color: var(--green); }
.status.soon { color: var(--muted); border-style: dashed; }
.kind { color: var(--muted); border-color: var(--rule); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.two .card p:last-child { margin-bottom: 0; }
.count { font: 700 0.85rem/1.2 var(--mono); color: var(--green); }

/* Admin pages */
.dash td.n, td.n { text-align: right; font-family: var(--mono); }
.dash td.warn { color: var(--red); font-weight: 700; }
.release { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 12px; }
.release h3 { font-size: 1.1rem; }
.release ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 0.95rem; }
.jobs { padding-left: 1.2em; }
.jobs ol { font-size: 0.92rem; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 20px; }
.admin-grid .card h3 { font-size: 1.1rem; }
.admin-grid .card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 860px) {
  .two { grid-template-columns: minmax(0, 1fr); }
}
a.card { display: block; color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--red); }
.feature .sep { color: var(--rule); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px 24px; margin: 0 0 1em; }
.kv dt { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kv dd { margin: 2px 0 0; font-weight: 600; }

/* Screenshots from CI */
.shot { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper-2); }
.feature .shot { margin: 0 auto 12px; max-height: 360px; width: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px; }
.shot-card { margin: 0; }
.shot-card .shots { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; }
.shot-card .shot-iphone { width: 120px; }
.shot-card .shot-ipad { width: 180px; }
.shot-card figcaption { margin-top: 10px; font-size: 0.92rem; }
.device-shot { margin: 0; }
.device-shot .shot { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.device-shot figcaption { margin-top: 8px; font-size: 0.85rem; }

/* Overnight page: one band per screen, caption beside its iPad and iPhone screenshots */
.night-stats { margin: 24px 0; }
.night-hero { margin: 24px 0 16px; }
.night-hero img { display: block; width: 100%; max-width: 960px; height: auto; border-radius: 18px; border: 8px solid #0d0e11; }
.night-hero figcaption { margin-top: 8px; font-size: 0.85rem; }
.night-bands { display: grid; gap: 40px; margin-top: 24px; }
.night-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 28px; align-items: start; padding-top: 28px; border-top: 1px solid var(--rule); }
.night-text { display: grid; gap: 8px; align-content: start; }
.night-text h3 { font-size: 1.4rem; margin: 0; }
.night-text p { margin: 0; }
.night-shots { display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.night-shot { margin: 0; min-width: 0; }
.night-shot img { display: block; width: 100%; height: auto; border: 6px solid #0d0e11; border-radius: 16px; }
.night-iphone img { border-radius: 22px; }
.night-shot figcaption { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) {
  .night-band { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .night-shots { grid-template-columns: minmax(0, 1fr); }
  .night-iphone { max-width: 220px; justify-self: center; width: 100%; }
}
