/* DP Seven app pages. No scripts, no third-party requests. */
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --ground: #F0EBE0; --surface: #E6E0D1; --ink: #1E2A78; --text: #232A52; --muted: #555B80;
  --rule: rgba(30, 42, 120, .2); --focus: #1E2A78; --apricot: #F2924A;
  --dp7-ground: #1E2A78; --dp7-ink: #F5F6FA; --dp7-seven: #F2924A; --dp7-word: #1E2A78;
  --step: clamp(1rem, .6rem + 1.6vw, 1.5rem);
  --ease: cubic-bezier(.2, .8, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0F1433; --surface: #181E4A; --ink: #F5F6FA; --text: #DDE0EE; --muted: #A6ABCB;
    --rule: rgba(245, 246, 250, .18); --focus: #F2924A;
    --dp7-ground: #F5F6FA; --dp7-ink: #1E2A78; --dp7-word: #F5F6FA;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 2rem; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 1.0625rem/1.62 "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  caret-color: var(--apricot);
}
::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

a { color: var(--ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
    text-decoration-color: var(--rule); transition: text-decoration-color .18s var(--ease); }
a:hover { text-decoration-color: currentColor; }
strong, b { font-weight: 800; color: var(--ink); }
code { font: .92em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface); padding: .1em .35em; border-radius: 4px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--ground); padding: .6rem 1rem; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 1rem; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell { width: min(100% - 2 * var(--step), 68rem); margin-inline: auto; }

/* ---------- header ---------- */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.logo { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.logo .dp7 { width: 44px; height: 44px; }
.logo .dp7-word { height: 22px; }
.masthead nav a { font-weight: 800; text-decoration: none; padding: .5rem 0; }
.masthead nav a:hover { text-decoration: underline; text-underline-offset: .3em; }

/* logo colour and the one hover movement, from the brand kit */
.dp7 { display: block; }
.dp7-ground { fill: var(--dp7-ground); } .dp7-seven { fill: var(--dp7-seven); } .dp7-fill { fill: var(--dp7-ink); }
.dp7-stroke { fill: none; stroke: var(--dp7-ink); stroke-width: 16; }
.dp7-word { fill: var(--dp7-word); display: block; width: auto; }
.dp7-hover .dp7-seven { transition: transform .25s var(--ease); }
a:hover > .dp7-hover .dp7-seven { transform: translate(6px, -16px); }

/* ---------- document layout ---------- */
.doc { display: grid; gap: 2.5rem; padding-block: 2.5rem 5rem; }
.side h1, .side .appname { font-weight: 800; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem); line-height: 1.04; letter-spacing: -.025em; color: var(--ink); margin: 0; text-wrap: balance; }
.side .appname a { text-decoration: none; }
.side .meta { color: var(--muted); margin: .7rem 0 0; font-size: .95rem; }

.switch { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; gap: 1.4rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.switch a { display: flex; align-items: center; gap: .5rem; padding: .8rem 0; text-decoration: none; color: var(--muted); }
.switch a:hover { color: var(--ink); }
.switch a[aria-current="page"] { color: var(--ink); font-weight: 800; }
.switch a::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; border: 1px solid var(--muted); flex: none; }
.switch a[aria-current="page"]::before { background: var(--apricot); border-color: var(--apricot); }

.toc { display: none; }

.prose { max-width: 68ch; min-width: 0; }
.prose > h1 { font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.prose > .date { color: var(--muted); margin: .4rem 0 0; font-size: .95rem; }
.prose h2 { font-weight: 800; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); margin: 2.8rem 0 .6rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); text-wrap: balance; }
.prose h3 { font-weight: 800; font-size: 1.0625rem; line-height: 1.35; color: var(--ink); margin: 1.8rem 0 .3rem; }
.prose p { margin: 0 0 1rem; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: .45rem; padding-left: .2rem; }
.prose li::marker { color: var(--muted); }
.prose .summary { margin: 1.6rem 0 0; font-size: 1.2rem; line-height: 1.5; color: var(--ink); }
.prose .summary p { margin: 0 0 .6rem; }
.prose .summary + h2 { margin-top: 2.2rem; }
.prose .note { background: var(--surface); border-radius: 10px; padding: 1rem 1.15rem; margin: 1.2rem 0; }
.prose .note p:last-child { margin-bottom: 0; }

/* ---------- lists of apps ---------- */
.lead { padding-block: clamp(2.5rem, 7vw, 5rem) 1rem; max-width: 46rem; }
.lead h1 { font-weight: 800; font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4.2rem); line-height: 1; letter-spacing: -.03em; color: var(--ink); margin: 0 0 1.1rem; text-wrap: balance; }
.lead p { font-size: 1.2rem; line-height: 1.5; margin: 0 0 1rem; max-width: 38rem; }
.group { padding-block: 1.5rem 1rem; }
.group h2 { font-weight: 400; font-size: .95rem; color: var(--muted); margin: 0; padding-bottom: .8rem; border-bottom: 1px solid var(--ink); }
.apps { list-style: none; margin: 0; padding: 0; }
.apps li { display: grid; gap: .3rem 2rem; padding-block: 1.35rem; border-bottom: 1px solid var(--rule); }
.apps h3 { font-weight: 800; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.apps h3 a { text-decoration: none; }
.apps h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.apps p { margin: 0; }
.apps .meta { color: var(--muted); font-size: .95rem; }
.apps .links { display: flex; gap: 1.4rem; font-weight: 800; order: 1; margin-top: .35rem; }
.end { padding-bottom: 5rem; }

.home { min-height: 72vh; display: grid; align-content: center; justify-items: start; gap: 1.6rem; padding-block: 4rem; }
.home .dp7 { width: clamp(88px, 14vw, 132px); height: auto; }
.home .dp7-word { height: clamp(30px, 5vw, 46px); }
.home p { font-size: 1.25rem; line-height: 1.5; max-width: 34rem; margin: 0; }
.button { display: inline-block; font-weight: 800; text-decoration: none; background: var(--ink); color: var(--ground); padding: .85rem 1.3rem; border-radius: 8px; transition: transform .18s var(--ease); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: none; }

/* the brand's reveal, played once on the home page */
@keyframes dp7-in-tile { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes dp7-in-seven { from { transform: translate(58px, -155px); } to { transform: translate(0, 0); } }
@keyframes dp7-in-letter { from { opacity: 0; transform: translate(0, 16px); } to { opacity: 1; transform: translate(0, 0); } }
@keyframes dp7-in-word { from { opacity: 0; transform: translate(-10px, 0); } to { opacity: 1; transform: none; } }
.dp7-reveal .dp7-ground { transform-box: view-box; transform-origin: 60px 60px; animation: dp7-in-tile .42s cubic-bezier(.2, .7, .3, 1) both; }
.dp7-reveal .dp7-seven { animation: dp7-in-seven .62s cubic-bezier(.22, .9, .24, 1) .12s both; }
.dp7-reveal .dp7-d { animation: dp7-in-letter .46s var(--ease) .30s both; }
.dp7-reveal .dp7-p { animation: dp7-in-letter .46s var(--ease) .38s both; }
.dp7-reveal-word { animation: dp7-in-word .5s var(--ease) .46s both; }

/* ---------- footer ---------- */
.colophon { border-top: 1px solid var(--rule); padding-block: 1.6rem 3rem; color: var(--muted); font-size: .9rem; display: grid; gap: .6rem; }
.colophon p { margin: 0; max-width: 68ch; }
.colophon a { color: inherit; }

/* ---------- wider screens ---------- */
@media (min-width: 40rem) {
  .apps li { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .apps .links { grid-row: 1 / span 2; grid-column: 2; align-self: center; margin-top: 0; }
}
@media (min-width: 60rem) {
  .doc { grid-template-columns: 17rem minmax(0, 1fr); gap: 5rem; padding-top: 3.5rem; }
  .side-inner { position: sticky; top: 2rem; }
  .switch { flex-direction: column; gap: 0; border-bottom: 0; }
  .switch li { border-bottom: 1px solid var(--rule); }
  .toc { display: block; margin-top: 2rem; font-size: .92rem; }
  .toc p { color: var(--muted); margin: 0 0 .5rem; }
  .toc ol { list-style: none; margin: 0; padding: 0; }
  .toc li { margin: 0 0 .35rem; line-height: 1.35; }
  .toc a { color: var(--muted); text-decoration: none; }
  .toc a:hover { color: var(--ink); text-decoration: underline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .masthead nav, .switch, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
  .doc { display: block; }
}
