/* arospkg landing page.
   Same family as /aros-term/ (IBM Plex, Workbench blue and orange), different
   shape: a light page whose one bold element is an Amiga window. Avoid grey
   bevelled panels: they read as Windows 3.1, not AmigaOS.
   Default styles describe the finished replay. Animations only show the way
   there, so reduced motion and no-JS both end on the true final state. */

:root {
  --ink: #000022;
  --text: #1d2230;
  --muted: #474d5c;
  --paper: #e9e9e7;
  --grey: #aaaaaa;
  --shell: #a3a3a3;
  --panel: #f4f4f2;
  --rule: #b8bac0;
  --blue: #0055aa;
  --blue-deep: #003d7a;
  --orange: #ff8800;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--text); font-size: 17px; line-height: 1.6; }
p, h1, h2, h3, figure, dl, dd, pre { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
code { font-family: var(--mono); font-size: .9em; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -100px; left: 1rem; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 2; }
.skip:focus { top: 1rem; }

/* Masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--mono); font-weight: 500; font-size: 19px; letter-spacing: -.2px; }
.brand:hover { color: var(--ink); }
.masthead nav, footer nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; }
.masthead nav a, footer nav a { color: var(--text); text-decoration: none; }
.masthead nav a:hover, footer nav a:hover { color: var(--blue); text-decoration: underline; }
.author { font-size: 14px; color: var(--muted); text-decoration: none; }

/* Hero */
.hero { padding-block: 64px 88px; }
h1 { font-family: var(--cond); font-weight: 600; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -1.2px; color: var(--ink); max-width: 15ch; }
.hero-text { display: grid; grid-template-columns: minmax(0, 62ch) minmax(0, 1fr); gap: 16px 64px; align-items: end; margin-top: 30px; }
.lede { font-size: 19px; color: var(--text); }
.lede-block p + p { margin-top: 16px; font-size: 17px; color: var(--muted); }
.state { display: flex; gap: 12px; align-items: baseline; font-size: 15px; color: var(--muted); }
.state-mark { width: 10px; height: 10px; flex-shrink: 0; background: var(--orange); border: 1px solid var(--ink); transform: translateY(1px); }

/* The replay window, drawn as an Amiga window rather than a bevelled PC one:
   flat frame, white title bar, close gadget left, depth gadget right, and a
   Workbench 1.3 CLI (white on blue, orange cursor). */
.replay-figure { margin-top: 52px; }
.replay { background: #fff; border: 2px solid var(--blue); }
.titlebar { display: flex; align-items: stretch; min-height: 34px; background: #fff; color: var(--blue); border-bottom: 2px solid var(--blue); font: 500 14px var(--mono); }
.gadget { flex-shrink: 0; width: 40px; display: grid; place-items: center; }
.gadget-close { border-right: 2px solid var(--blue); }
.gadget-close::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--blue); background: linear-gradient(var(--orange), var(--orange)) center / 4px 4px no-repeat; }
.gadget-depth { border-left: 2px solid var(--blue); }
.gadget-depth svg { display: block; }
.titlebar-title { flex: 1; min-width: 0; padding: 0 12px; line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replay-btn { align-self: center; margin-right: 10px; font: 500 13px var(--mono); color: var(--blue); background: #fff; border: 2px solid var(--blue); padding: 3px 10px; cursor: pointer; }
.replay-btn:hover { background: var(--blue); color: #fff; }
.replay-btn:active { background: var(--ink); border-color: var(--ink); color: #fff; }
.lanes { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.lane { padding: 16px 20px 22px; min-width: 0; }
.lane-label { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.lane-shell { background: var(--blue); }
.lane-shell .lane-label { color: #cfe0f2; }
.shell { font-family: var(--mono); font-size: 14px; line-height: 1.55; color: #fff; }
.ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--orange); vertical-align: text-bottom; }
.lane-steps { background: #fff; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 7px 0; }
.step + .step { border-top: 1px solid #dcdcd8; }
.step h3 { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.step p { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.step .aside { color: #5e6472; font-style: italic; }
.mark { position: relative; width: 16px; height: 16px; margin-top: 2px; border: 2px solid var(--ink); background: var(--ink); }
.mark::after { content: ""; position: absolute; left: 3px; top: 0; width: 5px; height: 9px; border: solid var(--orange); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.entry { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 4px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
.entry div { display: flex; gap: 6px; min-width: 0; }
.entry dt { color: #6a7080; }
.entry dd { color: var(--ink); }
.entry .hash { flex-basis: 100%; }
.entry .hash dd { overflow-wrap: anywhere; }
.bytes { font-family: var(--mono); color: var(--ink); }
.bytes { counter-reset: bytes var(--bytes); --bytes: 218782; }
.bytes::after { content: counter(bytes); }
.file { font-family: var(--mono); font-size: .95em; color: var(--ink); white-space: nowrap; }
.suffix { display: inline-block; max-width: 0; overflow: hidden; vertical-align: bottom; opacity: 0; }
/* Live prompt after the replay. pkg output stays mono and white; the page's own
   notes are sans italic in pale blue, so they never read as pkg output. */
.shell.live { max-height: 30rem; overflow: auto; }
/* Column output (help, search, doctor) keeps its alignment and scrolls sideways instead of wrapping. */
.ln.ln-pre { white-space: pre; overflow-wrap: normal; width: max-content; min-width: 100%; }
.ln:empty { min-height: 1.55em; }
.commands-note { margin-top: 18px; font-size: 15px; color: var(--muted); }
.ln-input { display: flex; }
.ln-input span { flex-shrink: 0; white-space: pre; }
.ln-input input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; caret-color: var(--orange); }
.lane-shell:focus-within { box-shadow: inset 0 0 0 3px var(--orange); }
.ln.note { margin: 2px 0 6px; font: italic 14px/1.5 var(--sans); color: #cfe0f2; white-space: normal; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #3f78b8; }
.try span { font-size: 13px; color: #cfe0f2; margin-right: 2px; }
.try button { font: 500 13px var(--mono); color: #fff; background: transparent; border: 2px solid #fff; padding: 3px 9px; cursor: pointer; }
.try button:hover { background: #fff; color: var(--blue); }
.lane-label code { color: var(--ink); }
.lane-empty { font-size: 14px; color: var(--muted); }
.step.is-pending { opacity: .34; }
.step.is-pending .mark { background: transparent; border-color: #8a8f99; }
.step.is-active .mark { background: var(--blue); border-color: var(--blue); }
.step.is-pending .mark::after, .step.is-active .mark::after { visibility: hidden; }

/* Commands reference */
.commands { margin-top: 28px; }
.commands div { display: grid; grid-template-columns: minmax(0, 19ch) minmax(0, 1fr); gap: 4px 28px; padding: 16px 0; border-top: 1px solid var(--rule); }
.commands div:last-child { border-bottom: 1px solid var(--rule); }
.commands dt { font: 500 15px/1.6 var(--mono); color: var(--ink); }
.commands dt var { font-style: italic; color: var(--blue); }
.commands dd { font-size: 16px; color: var(--muted); }
.commands dd var { font-style: italic; }
.commands .example { display: block; margin-top: 8px; padding: 8px 10px; background: var(--blue); color: #fff; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }

.replay-figure figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 72ch; }

@property --bytes { syntax: "<integer>"; inherits: false; initial-value: 218782; }

@media (prefers-reduced-motion: no-preference) {
  .run .ln { animation: hold-hidden var(--at) linear; }
  .run .cursor { animation: blink 1.1s steps(1, end) 9.6s infinite; }
  .run .step { animation: hold-pending var(--at) linear, hold-active calc(var(--done) - var(--at)) linear var(--at); }
  .run .mark { animation: mark-pending var(--at) linear, mark-active calc(var(--done) - var(--at)) linear var(--at); }
  .run .mark::after { animation: hold-hidden var(--done) linear; }
  .run .bytes { animation: count 1.3s cubic-bezier(.3, .1, .6, 1) 3.35s backwards; }
  .run .suffix { animation: keep-suffix 6.1s linear; }
}

@keyframes hold-hidden { from, to { visibility: hidden; } }
@keyframes hold-pending { from, to { opacity: .34; } }
@keyframes hold-active { from, to { opacity: 1; } }
@keyframes mark-pending { from, to { background: transparent; border-color: #8a8f99; } }
@keyframes mark-active { 0%, 100% { background: var(--blue); border-color: var(--blue); } 50% { background: #3f86d0; border-color: #3f86d0; } }
@keyframes count { from { --bytes: 0; } to { --bytes: 218782; } }
@keyframes keep-suffix { from, to { max-width: 6ch; opacity: 1; } }
@keyframes blink { 50% { visibility: hidden; } }

/* Sections */
.sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px 64px; padding-block: 84px; border-top: 2px solid var(--ink); }
h2 { font-family: var(--cond); font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.6px; color: var(--ink); }
.sec-body { max-width: 68ch; }
.sec-body > p + p { margin-top: 16px; }
h3 { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--ink); }

/* Overlay map */
.map { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); margin-top: 40px; font-size: 14px; }
.node { background: var(--panel); border: 2px solid var(--ink); padding: 14px 16px; }
.node p + p { margin-top: 4px; color: var(--muted); }
.node-title { font-family: var(--mono); font-weight: 500; font-size: 15px; color: var(--ink); }
.node .node-data { margin-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
.node-pkg { grid-column: 1 / -1; grid-row: 3; background: var(--blue); border-color: var(--blue); }
.node-pkg .node-title { color: #fff; }
.node-pkg p + p { color: #dce8f5; }
.edge { position: relative; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); }
.edge-points::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--ink); }
.edge-points::after { content: ""; position: absolute; right: 0; top: calc(50% - 5px); border: 6px solid transparent; border-left: 8px solid var(--ink); border-right: 0; }
.edge-points span { position: relative; background: var(--paper); padding: 0 6px; transform: translateY(-14px); }
.edge-up { grid-row: 2; height: 64px; }
.edge-reads { grid-column: 1; }
.edge-fetches { grid-column: 3; }
.edge-up::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid var(--ink); }
.edge-up::after { content: ""; position: absolute; top: 0; left: calc(50% - 5px); border: 6px solid transparent; border-bottom: 8px solid var(--ink); border-top: 0; margin-left: 1px; }
.edge-up span { position: relative; background: var(--paper); padding: 2px 6px; }

/* Proposed standard: dotted edges match the intent tier, so the page reads the
   same way everywhere — solid is measured, dashed is being built, dotted is not real yet. */
.tag { display: inline-block; font: 500 12.5px var(--mono); color: var(--ink); border: 2px dotted #6f7480; padding: 5px 11px; }
.claim { margin-top: 20px; font-family: var(--cond); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; color: var(--ink); max-width: 30ch; }
.sec-body .claim + p { margin-top: 18px; }
.standard { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 44px; margin-top: 36px; padding-top: 30px; border-top: 2px dotted #6f7480; }
.standard p { margin-top: 8px; font-size: 16px; color: var(--muted); }
.standard-note { margin-top: 30px; font-size: 15px; color: var(--muted); }
.sub { margin-top: 40px; font-family: var(--cond); font-size: 24px; font-weight: 600; }
.sub + p { margin-top: 12px; }
.manifest-figure { margin-top: 20px; }
/* The widest thing on the page: it scrolls itself rather than the page. */
.manifest { background: var(--blue); color: #fff; font: 13px/1.6 var(--mono); padding: 18px 20px; white-space: pre; overflow-x: auto; }
.roles { margin-top: 18px; }
.roles div { display: grid; grid-template-columns: minmax(0, 16ch) minmax(0, 1fr); gap: 4px 28px; padding: 12px 0; border-top: 1px solid var(--rule); }
.roles div:last-child { border-bottom: 1px solid var(--rule); }
.roles dt { font: 500 15px var(--mono); color: var(--ink); }
.roles dd { margin: 0; font-size: 16px; color: var(--muted); }

/* Your files */
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; }
.notes p { margin-top: 8px; font-size: 16px; color: var(--muted); }
.outputs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 44px; }
.outputs figure, .session { min-width: 0; }
.session { margin-top: 40px; }
.cmd { font-weight: 600; color: #fff; }
.session figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.out { background: var(--blue); color: #fff; font: 13.5px/1.55 var(--mono); padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.outputs figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Status */
.tiers { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr .85fr 1.15fr; gap: 40px; margin-top: 20px; }
.tier { padding-top: 18px; border-top: 4px solid var(--ink); }
.tier-next { border-top-style: dashed; border-top-color: var(--blue); }
.tier-later { border-top: 4px dotted #6f7480; }
.tier-note { margin-top: 4px; font-size: 14px; color: var(--muted); }
.tier ul { margin: 16px 0 0; padding-left: 18px; font-size: 15.5px; }
.tier li { padding: 4px 0 4px 2px; }
.tier li::marker { color: #6f7480; }

.proof { grid-column: 1 / -1; margin-top: 8px; }
.proof-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; }
.proof img { border: 2px solid var(--blue); width: 100%; }
.proof figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 68ch; }
.limits { grid-column: 1 / -1; background: #fff; border: 2px solid var(--ink); padding: 26px 30px 28px; margin-top: 36px; color: #000; }
.limits h3 { font-family: var(--cond); font-size: 26px; font-weight: 600; }
.limits ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; font-size: 15.5px; }
.limits li { padding-left: 16px; border-left: 3px solid var(--orange); }
.limits strong { font-weight: 600; }

.along { grid-column: 2; font-size: 16px; color: var(--muted); max-width: 68ch; }
.footnote { grid-column: 2; font-size: 14px; color: var(--muted); max-width: 68ch; margin-top: -12px; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 30px; border-top: 2px solid var(--ink); }
footer nav { font-size: 14px; }

@media (max-width: 900px) {
  .hero-text, .sec { grid-template-columns: minmax(0, 1fr); }
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .tiers { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .along, .footnote { grid-column: 1; }
  .footnote { margin-top: 0; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  body { font-size: 16px; }
  .masthead { flex-wrap: wrap; gap: 12px 20px; padding-block: 18px; }
  .masthead .author { display: none; }
  .masthead nav { gap: 6px 18px; font-size: 14px; }
  .hero { padding-block: 40px 60px; }
  h1 { letter-spacing: -.6px; }
  .lede { font-size: 17px; }
  .lane { padding: 12px 12px 16px; }
  .shell { font-size: 12.5px; }
  .replay-btn { padding: 2px 7px; margin-right: 6px; font-size: 12px; }
  .titlebar { font-size: 12.5px; }
  .gadget { width: 30px; }
  .titlebar-title { padding: 0 8px; }
  .sec { padding-block: 56px; }
  .notes, .limits ul, .commands div, .standard, .roles div, .proof-pair { grid-template-columns: minmax(0, 1fr); }
  .ln-input input { font-size: 16px; }
  .limits { padding: 20px; }
  .map { grid-template-columns: minmax(0, 1fr); }
  .edge-points { height: 56px; }
  .edge-points::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px solid var(--ink); }
  .edge-points::after { right: auto; left: calc(50% - 5px); top: auto; bottom: 0; border: 6px solid transparent; border-top: 8px solid var(--ink); border-bottom: 0; margin-left: 1px; }
  .edge-points span { transform: none; padding: 2px 6px; }
  .node-archive { grid-row: auto; }
  .edge-up { grid-row: auto; grid-column: 1; height: 56px; }
  .edge-reads { display: none; }
  .edge-fetches span::before { content: "reads the entry and "; }
  .node-pkg { grid-row: auto; grid-column: 1; }
  footer { flex-direction: column; align-items: flex-start; }
}
