/* Patchwell, a Tileio showcase site.
   Tokens: the "Night desk" palette of the changelog-kb page layer. Type: Instrument Serif for headings and
   Instrument Sans for everything else (changelog-kb), Fragment Mono for code (typing-headline). */
:root { color-scheme: dark; --bg: #14120f; --fg: #efe9dc; --accent: #fbbf24; --accent-2: #f87171; --muted: color-mix(in oklab, var(--fg) 68%, var(--bg)); --accent-ink: color-mix(in oklab, var(--accent) 76%, var(--fg)); --accent-2-ink: color-mix(in oklab, var(--accent-2) 76%, var(--fg)); --on-accent: color(from var(--accent) xyz-d65 calc(clamp(0, (0.18 - y) * 10000, 1) * 0.9505) clamp(0, (0.18 - y) * 10000, 1) calc(clamp(0, (0.18 - y) * 10000, 1) * 1.089)); --on-accent-2: color(from var(--accent-2) xyz-d65 calc(clamp(0, (0.18 - y) * 10000, 1) * 0.9505) clamp(0, (0.18 - y) * 10000, 1) calc(clamp(0, (0.18 - y) * 10000, 1) * 1.089)); --line: color-mix(in oklab, var(--fg) 12%, transparent); --font-display: "Instrument Sans"; --font-body: "Instrument Sans"; --font-serif: "Instrument Serif"; --font-mono: "Fragment Mono"; --v-stroke: currentColor; --v-accent: var(--accent); }
/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body), system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
a, button, [role=tab], [role=slider] { touch-action: manipulation; }
main { display: block; padding-top: 72px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; } .skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ui { width: 18px; height: 18px; flex: none; }
.sec-rule { max-width: 1120px; margin: 0 auto; border: 0; border-top: 1px solid var(--line); }

/* navigation (smart-sticky-nav section) */
#navigation { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 72px; transition: background 220ms, transform 260ms ease-in, box-shadow 220ms; }
#navigation.compact { background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
#navigation.hide:not(:focus-within):not(.open) { transform: translateY(-110%); }
#navigation.show { transition: background 220ms, transform 520ms cubic-bezier(.34,1.56,.64,1), box-shadow 220ms; }
#navigation .in { position: relative; height: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
#navigation .wm { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 700 19px var(--font-display); letter-spacing: -0.02em; color: var(--fg); text-decoration: none; }
#navigation .wm i { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent)); }
#navigation ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; }
#navigation ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; } #navigation ul a:hover, #navigation ul a[aria-current=page] { color: var(--fg); }
#navigation .cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 10px; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 14px; }
#navigation .menu { display: none; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--fg); font-weight: 600; font-size: 15px; cursor: pointer; }
#navigation .menu .i-x, #navigation.open .menu .i-m { display: none; } #navigation.open .menu .i-x { display: block; }
#navigation .prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
#navigation a:focus-visible, #navigation button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media (max-width: 720px) {
  #navigation ul, #navigation .cta { display: none; } #navigation .menu { display: inline-flex; }
  #navigation.open { background: var(--bg); box-shadow: 0 1px 0 var(--line); }
  #navigation.open ul { display: grid; gap: 0; position: absolute; top: 72px; left: 0; right: 0; padding: 8px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
  #navigation.open ul a { width: 100%; min-height: 48px; font-size: 17px; color: var(--fg); border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { #navigation, #navigation.show { transition: background 220ms, opacity 200ms; } #navigation.hide:not(:focus-within):not(.open) { transform: none; opacity: 0; pointer-events: none; } }

/* footer (status-bar-footer section) */
#footer { border-top: 1px solid var(--line); font: 400 14px/1.5 var(--font-body); }
#footer .cols { max-width: 1200px; margin: 0 auto; padding: 56px 28px 0; display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); }
#footer .brand { padding-right: 28px; } #footer .brand a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg); text-decoration: none; font: 700 20px var(--font-display); letter-spacing: -0.02em; } #footer .brand a i { width: 24px; height: 24px; border-radius: 7px; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent)); }
#footer .brand p { margin: 18px 0 0; max-width: 15ch; font: 400 31px/1.08 var(--font-serif); letter-spacing: -0.01em; }
#footer nav { padding: 2px 22px 0; border-left: 1px solid var(--line); } #footer h3 { margin: 0 0 12px; font: 400 12px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#footer ul { margin: 0; padding: 0; list-style: none; } #footer li a { color: var(--fg); text-decoration: none; font: 500 15px/2.1 var(--font-display); } #footer li a:hover, #footer li a:focus-visible { color: var(--accent-ink); outline: none; text-decoration: underline; text-underline-offset: 4px; }
#footer li small { margin-left: 6px; padding: 1px 5px; border: 1px solid var(--accent); color: var(--accent-ink); font: 400 12px var(--font-body); vertical-align: 2px; }
#footer .bar { position: relative; max-width: 1200px; margin: 88px auto 0; background: color-mix(in oklab, var(--fg) 4%, var(--bg)); display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; border-top: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
#footer .bar > * { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 17px 22px; border-right: 1px solid var(--line); white-space: nowrap; } #footer .bar > :last-child { border-right: 0; }
#footer .st { border: 0; border-right: 1px solid var(--line); background: none; color: var(--fg); font: inherit; cursor: pointer; text-align: left; } #footer .st:hover, #footer .st[aria-expanded=true] { background: color-mix(in oklab, var(--fg) 5%, var(--bg)); }
#footer .st i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #2fcf73; } #footer .st i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #2fcf73; animation: sb-pulse 2s infinite; } #footer .st span { color: var(--muted); }
#footer .lat { gap: 16px; } #footer .lat span { display: inline-flex; gap: 6px; } #footer .lat b { font-weight: 400; color: var(--muted); } #footer .lat em { display: inline-block; width: 46px; font-style: normal; transition: color 300ms; } #footer .lat em.ok { color: #2fcf73; } #footer .lat em.mid { color: #e8b339; } #footer .lat em.hi { color: #f0605d; }
#footer .tick { position: relative; overflow: hidden; height: 54px; } #footer .tick > b { flex: none; font-weight: 400; color: var(--accent-ink); } #footer .tick .win { position: relative; flex: 1; min-width: 0; height: 100%; } #footer .tick .win span { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); overflow: hidden; text-overflow: ellipsis; }
#footer .clock b { font-weight: 400; color: var(--muted); }
#footer .bar > .pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 2; display: block; width: 360px; padding: 16px; white-space: normal; border-right: 1px solid var(--line); background: var(--bg); border: 1px solid var(--line); box-shadow: 0 20px 40px -20px #0008; }
#footer .pop[hidden] { display: none; } #footer .pop p { margin: 0 0 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; } #footer .pop p span { color: var(--muted); text-align: right; }
#footer .days { display: flex; gap: 3px; height: 34px; } #footer .days i { position: relative; flex: 1; background: #2fcf73; opacity: .85; } #footer .days i.inc { background: #e8b339; opacity: 1; } #footer .days i:hover { opacity: 1; outline: 1px solid var(--fg); }
#footer .days i:hover::after, #footer .days i:focus::after { content: attr(data-t); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 6px 8px; background: var(--fg); color: var(--bg); font-size: 12px; white-space: nowrap; }
#footer .legal { max-width: 1200px; margin: 0 auto; padding: 14px 28px 26px; display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); } #footer .legal span { margin-right: auto; }
#footer .legal .tileio-made { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border: 1px solid color-mix(in oklab, var(--fg) 22%, transparent); border-radius: 999px; color: var(--fg); font: 500 13px var(--font-body); text-decoration: none; white-space: nowrap; } #footer .legal .tileio-made:hover, #footer .legal .tileio-made:focus-visible { border-color: var(--accent); outline: none; }
@keyframes sb-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (max-width: 900px) { #footer .cols { grid-template-columns: 1fr 1fr; row-gap: 28px; } #footer .brand { grid-column: span 2; } #footer nav:nth-of-type(odd) { border-left: 0; padding-left: 0; } #footer nav { padding-left: 16px; } #footer .bar { grid-template-columns: minmax(0, 1fr) auto; margin-top: 72px; } #footer .bar > * { border-bottom: 1px solid var(--line); padding: 12px 16px; overflow: hidden; } #footer .bar .lat { grid-column: 1 / -1; order: 3; justify-content: space-between; gap: 6px; } #footer .bar .lat em { width: auto; } #footer .bar .tick { grid-column: 1 / -1; order: 4; } #footer .st span { display: none; } #footer .pop { width: auto; right: 0; } #footer .legal { flex-wrap: wrap; gap: 10px 16px; } }
@media (prefers-reduced-motion: reduce) { #footer .st i::after { animation: none; } }
#footer .pz { position: absolute; z-index: 5; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--fg) 22%, transparent); background: color-mix(in oklab, var(--bg) 82%, transparent); color: var(--fg); cursor: pointer; backdrop-filter: blur(6px); } #footer .pz svg { width: 14px; height: 14px; fill: currentColor; } #footer .pz[aria-pressed=true] .i-pa, #footer .pz:not([aria-pressed=true]) .i-pl { display: none; } #footer .pz:hover { border-color: var(--fg); } #footer .pz:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } #footer .tick .pz { position: relative; flex: none; width: 28px; height: 28px; margin-left: 10px; backdrop-filter: none; } #footer:has(.pz[aria-pressed=true]) .st i::after { animation: none; }
