/* NotchFox site. Visual language from Sources/NotchFox/Views/Theme.swift:
   "lens coating". True black like the camera housing, quiet type, hairlines
   instead of boxes, and three coating hues with fixed jobs:
   violet = selection and links, teal = on / success / charging, amber = time. */

@property --sweep {
  syntax: '<percentage>';
  inherits: false;
  initial-value: -60%;
}

:root {
  --housing: #000000;
  --ink: #F5F5F7;
  --ink2: #A1A1A6;
  --ink3: #636366;
  --hair: rgba(255, 255, 255, .09);
  --well: rgba(255, 255, 255, .065);
  --well-h: rgba(255, 255, 255, .11);
  --violet: #8E7CFF;
  --teal: #5AD8C8;
  --amber: #FFB547;

  --serif: "Newsreader", "New York", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Overwritten from JS with a sampled spring (linear()). */
  --spring: cubic-bezier(.3, 1.25, .5, 1);
  --spring-dur: 560ms;
  --snappy: cubic-bezier(.25, 1.1, .5, 1);

  --bezel: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--housing);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--bezel);
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img, svg, video { display: block; }
.serif { font-family: var(--serif); }
.spacer { flex: 1; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #000; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.ic { width: 1em; height: 1em; flex: none; }

/* ============ The screen (hero) ============ */
.screen {
  position: relative;
  margin: 0 var(--bezel);
  border-radius: 14px 14px 18px 18px;
  overflow: hidden;
  isolation: isolate;
  transition: filter .15s linear;
}
.wallpaper {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 70% at 18% 108%, rgba(96, 78, 210, .55) 0%, rgba(96, 78, 210, 0) 60%),
    radial-gradient(90% 60% at 88% 104%, rgba(38, 150, 140, .45) 0%, rgba(38, 150, 140, 0) 60%),
    radial-gradient(70% 45% at 55% 118%, rgba(214, 150, 60, .35) 0%, rgba(214, 150, 60, 0) 70%),
    linear-gradient(180deg, #16161c 0%, #1c1b26 45%, #262338 100%);
}

/* Menu bar = site navigation. The notch sits in the middle of it. */
.menubar {
  position: relative; z-index: 10;
  height: 32px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  font-size: 13px;
  background: rgba(10, 10, 16, .38);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 4px; height: 100%; }
.menubar a { text-decoration: none; }
.mb-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 0 8px; height: 24px; border-radius: 5px; }
.mark { width: 18px; height: 10px; color: var(--ink); }
.mb-link { padding: 0 9px; height: 24px; display: inline-flex; align-items: center; border-radius: 5px; color: rgba(245, 245, 247, .92); }
.mb-link:hover, .mb-brand:hover { background: rgba(255, 255, 255, .14); }
.mb-status { display: inline-flex; align-items: center; padding: 0 6px; font-size: 15px; color: var(--ink); }
.mb-clock { padding: 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-cta {
  margin-left: 6px; height: 22px; padding: 0 11px; border-radius: 999px;
  display: inline-flex; align-items: center;
  background: var(--ink); color: #000; font-weight: 600; font-size: 12px;
}
.mb-cta:hover { background: #fff; }

/* ============ The notch ============ */
.notch-wrap {
  position: absolute; top: 0; left: 50%; z-index: 30;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.notch {
  --nw: 186px; --nh: 32px; --pw: 660px; --ph: 228px;
  --bw: var(--nw); --bh: var(--nh); --t: 6px; --b: 10px; --wing: 0px;
  display: flex; align-items: flex-start;
  filter: drop-shadow(0 0 0 transparent);
}
.ear {
  width: var(--t); height: var(--t); flex: none;
  transition: width var(--spring-dur) var(--spring), height var(--spring-dur) var(--spring);
}
.ear-l { background: radial-gradient(circle farthest-corner at 0 100%, transparent 70%, #000 71.5%); }
.ear-r { background: radial-gradient(circle farthest-corner at 100% 100%, transparent 70%, #000 71.5%); }

.notch-body {
  position: relative;
  width: var(--bw); height: var(--bh);
  background: #000;
  border-radius: 0 0 var(--b) var(--b);
  overflow: hidden;
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0);
  transition:
    width var(--spring-dur) var(--spring),
    height var(--spring-dur) var(--spring),
    border-radius var(--spring-dur) var(--spring),
    box-shadow .3s ease;
}
.notch[data-open="true"] .notch-body { box-shadow: 0 12px 44px rgba(0, 0, 0, .6); }

/* Collapsed: housing in the middle, a wing either side. */
.collapsed {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: calc(var(--nw) + var(--wing) * 2); height: var(--nh);
  display: grid; grid-template-columns: var(--wing) var(--nw) var(--wing);
  align-items: center;
  border-radius: 0 0 var(--b) var(--b);
  transition: opacity .18s ease, width var(--spring-dur) var(--spring), grid-template-columns var(--spring-dur) var(--spring);
}
.collapsed:focus-visible { outline-offset: -3px; }
.housing { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 22%; }
.lens { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #20202a, #050507 70%); box-shadow: inset 0 0 0 1px #0c0c12; opacity: .9; }
.wing { display: flex; align-items: center; justify-content: center; overflow: hidden; height: 100%; color: var(--ink); }
.notch[data-open="true"] .collapsed { opacity: 0; visibility: hidden; transition: opacity .1s ease, visibility 0s .1s; }

.wing .ic { width: 15px; height: 15px; }
.w-art { width: 22px; height: 22px; border-radius: 5px; background-size: cover; }
.w-amber { color: var(--amber); }
.w-teal { color: var(--teal); }
.w-time { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--amber); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; }
.w-done { font-size: 12px; font-weight: 700; color: var(--amber); }
.w-pct { font-size: 12px; font-weight: 600; color: var(--teal); font-variant-numeric: tabular-nums; }
.meter { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width .12s ease-out; }
.meter.amber > span { background: var(--amber); }
.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.eq { display: flex; align-items: center; gap: 2px; height: 14px; }
.eq span { width: 3px; height: 14px; border-radius: 2px; background: var(--tint, var(--teal)); transform: scaleY(.3); animation: eq 1s ease-in-out infinite alternate; }
.eq span:nth-child(1) { animation-duration: .55s; }
.eq span:nth-child(2) { animation-duration: .42s; animation-delay: -.2s; }
.eq span:nth-child(3) { animation-duration: .63s; animation-delay: -.35s; }
.eq span:nth-child(4) { animation-duration: .48s; animation-delay: -.1s; }
.eq.still span { animation: none; }
.eq.still span:nth-child(1) { transform: scaleY(.55); }
.eq.still span:nth-child(2) { transform: scaleY(.95); }
.eq.still span:nth-child(3) { transform: scaleY(.45); }
.eq.still span:nth-child(4) { transform: scaleY(.75); }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

/* Expanded panel: laid out at full size, revealed by the body's clip. */
.expanded {
  position: absolute; top: 0; left: 50%;
  width: var(--pw); height: var(--ph);
  display: flex; flex-direction: column;
  opacity: 0;
  transform: translateX(-50%) scale(.92);
  transform-origin: 50% 0;
  transition: opacity .1s ease-in, transform .1s ease-in;
  font-size: 12px; line-height: 1.35;
}
.notch[data-open="true"] .expanded {
  opacity: 1; transform: translateX(-50%) scale(1);
  transition: opacity .22s ease-out .06s, transform .22s ease-out .06s;
}

.xp-head { height: var(--nh); display: flex; align-items: center; flex: none; }
.tabs { flex: 1; display: flex; align-items: center; gap: 1px; padding-left: 14px; min-width: 0; }
.xp-housing { width: var(--nw); flex: none; }
.xp-tools { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-right: 16px; color: var(--ink2); }

.tab {
  height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--ink3);
  transition: color .15s ease, background-color .2s var(--snappy), padding .2s var(--snappy);
  white-space: nowrap;
}
.tab .ic { width: 13px; height: 13px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: #000; padding: 0 9px; }
.tab .tab-label { display: none; }
.tab[aria-selected="true"] .tab-label { display: inline; animation: label-in .22s var(--snappy); }
@keyframes label-in { from { opacity: 0; transform: scale(.8); transform-origin: left center; } }

.icon-btn {
  min-width: 20px; min-height: 20px; display: inline-flex; align-items: center; justify-content: center;
  color: inherit; border-radius: 6px;
  transition: transform .2s var(--snappy), color .15s ease;
}
.icon-btn .ic { width: 14px; height: 14px; }
.icon-btn:hover { transform: scale(1.06); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn[aria-pressed="true"] { color: var(--violet); }
.icon-btn-lg .ic { width: 16px; height: 16px; }

.batt-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink2); }
.batt { display: inline-flex; align-items: center; gap: 1px; }
.batt-body { position: relative; width: 22px; height: 11px; border: 1px solid var(--ink3); border-radius: 3px; padding: 1px; display: flex; }
.batt-fill { height: 100%; border-radius: 1.5px; background: var(--ink); }
.batt.charging .batt-fill { background: var(--teal); }
.batt-bolt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #000; }
.batt-bolt .ic { width: 8px; height: 8px; }
.batt-cap { width: 1.5px; height: 4px; border-radius: 1px; background: var(--ink3); }
.mb-batt .batt-body { border-color: rgba(245, 245, 247, .55); }
.mb-batt .batt-cap { background: rgba(245, 245, 247, .55); }

.xp-content { position: relative; flex: 1; min-height: 0; padding: 10px 20px 18px; }
.tp { height: 100%; animation: tab-in .22s var(--snappy); }
@keyframes tab-in { from { opacity: 0; transform: translateY(4px); } }

.xp-title { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.2; }
.xp-sub { margin: 4px 0 0; font-size: 11.5px; color: var(--ink2); max-width: 320px; line-height: 1.4; }
.xp-note { font-size: 10.5px; color: var(--ink3); }
.xp-foot { font-size: 11px; color: var(--ink3); }

.pill {
  height: 24px; padding: 0 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: var(--well); color: var(--ink);
  transition: background-color .15s ease, transform .2s var(--snappy);
}
.pill:hover { background: var(--well-h); transform: scale(1.03); }
.pill:active { transform: scale(.94); }
.pill .ic { width: 12px; height: 12px; }
.pill-strong { background: var(--ink); color: #000; }
.pill-strong:hover { background: #fff; }
.pill-file { position: relative; margin-top: 10px; cursor: pointer; }
.pill-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pill-file:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }

.link-btn { color: var(--violet); font-size: inherit; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { color: var(--ink3); cursor: default; text-decoration: none; }

/* Home */
.tp-home { display: flex; align-items: stretch; }
.np { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; }
.np-art-wrap { position: relative; width: 124px; height: 124px; flex: none; transition: transform .38s var(--spring); }
.np-art-wrap.paused { transform: scale(.95); }
.np-art { position: absolute; inset: 0; border-radius: 12px; background-size: cover; }
.np-glow { position: absolute; inset: 0; border-radius: 12px; background: var(--tint); filter: blur(28px); opacity: .2; transition: opacity .38s ease; }
.np-art-wrap:not(.paused) .np-glow { opacity: .55; }
.np-meta { flex: 1; min-width: 0; height: 124px; display: flex; flex-direction: column; }
.np-title { font-size: 17px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 12px; font-weight: 500; color: var(--ink2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-source { font-size: 10.5px; color: var(--ink3); margin-top: 1px; }
.np-progress { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 9.5px; font-weight: 500; color: var(--ink3); font-variant-numeric: tabular-nums; }
.np-progress > span:first-child { width: 30px; }
.np-progress > span:last-child { width: 34px; text-align: right; }
.np-bar { flex: 1; height: 10px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.np-track { position: relative; display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; transition: height .2s var(--snappy); }
.np-bar:hover .np-track, .np-bar:focus-visible .np-track { height: 6px; }
.np-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--tint); }
.np-transport { display: flex; align-items: center; justify-content: center; gap: 30px; padding-top: 8px; color: var(--ink); }
.np-play {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #000;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s var(--snappy);
}
.np-play .ic { width: 16px; height: 16px; }
.np-play:hover { transform: scale(1.06); }
.np-play:active { transform: scale(.92); }
.vrule { width: 1px; background: var(--hair); margin: 6px 18px; flex: none; }
.today { width: 200px; flex: none; }
.today-day { font-size: 20px; font-weight: 600; line-height: 1.15; }
.today-date { font-size: 11.5px; font-weight: 500; color: var(--ink2); }
.timeline { list-style: none; margin: 10px 0 0; padding: 0; }
.tl { display: flex; gap: 9px; }
.tl-rail { width: 8px; flex: none; display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--c); margin-top: 3px; flex: none; }
.tl.now .tl-dot { background: var(--c); }
.tl-line { flex: 1; width: 1px; background: var(--hair); }
.tl:last-child .tl-line { display: none; }
.tl-text { padding-bottom: 8px; min-width: 0; }
.tl-title { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-time { font-size: 10px; font-weight: 500; color: var(--ink3); font-variant-numeric: tabular-nums; }
.tl.now .tl-time { color: var(--c); }

/* Shelf */
.shelf-empty { height: 100%; display: flex; align-items: center; justify-content: center; gap: 18px; }
.drop-well {
  width: 96px; height: 96px; flex: none; border-radius: 16px;
  border: 1.5px dashed var(--ink3); color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, color .2s ease;
}
.drop-well .ic { width: 24px; height: 24px; transition: transform .38s var(--spring); }
.notch[data-drop="true"] .drop-well { border-color: var(--violet); color: var(--violet); }
.notch[data-drop="true"] .drop-well .ic { transform: translateY(4px); }
.shelf-full { height: 100%; display: flex; flex-direction: column; gap: 8px; }
.shelf-tiles { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-height: 0; }
.shelf-tiles::-webkit-scrollbar { display: none; }
.tile {
  position: relative; flex: none; width: 100px; padding: 10px 6px; border-radius: 14px;
  background: var(--well);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: background-color .15s ease;
  animation: tile-in .3s var(--spring);
}
@keyframes tile-in { from { opacity: 0; transform: scale(.85); } }
.tile:hover, .tile:focus-within { background: var(--well-h); }
.tile-name { width: 88px; height: 28px; font-size: 10.5px; font-weight: 500; color: var(--ink2); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; line-height: 1.3; }
.tile:hover .tile-name { color: var(--ink); }
.tile-x {
  position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: #2C2C2E; color: var(--ink); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s ease;
}
.tile-x .ic { width: 8px; height: 8px; }
.tile:hover .tile-x, .tile:focus-within .tile-x { opacity: 1; }
.thumb { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.thumb-doc { width: 48px; height: 62px; border-radius: 4px; background: linear-gradient(#fdfdfd, #e9e9ee); position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; color: #6e6e73; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.thumb-doc::before { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: linear-gradient(225deg, #000 50%, #cfcfd6 50%); border-bottom-left-radius: 3px; }
.thumb-doc .ic { position: absolute; top: 16px; width: 20px; height: 20px; color: #8e8e93; }
.thumb-img { width: 64px; height: 50px; border-radius: 4px; border: 2px solid #f5f5f7; background: linear-gradient(135deg, #6f63d8, #2aa597 60%, #e0a24a); color: rgba(255, 255, 255, .85); display: flex; align-items: center; justify-content: center; }
.thumb-img .ic { width: 22px; height: 22px; }
.thumb-folder { color: #5AA7F5; }
.thumb-folder .ic { width: 60px; height: 60px; }
.shelf-foot { display: flex; align-items: center; gap: 8px; flex: none; }

/* Clipboard */
.tp-clip { display: flex; flex-direction: column; gap: 6px; }
.clip-head { display: flex; align-items: center; gap: 10px; flex: none; }
.clip-head .xp-title { font-size: 16px; }
.toggle { width: 30px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, .16); padding: 2px; display: flex; transition: background-color .2s var(--snappy); flex: none; }
.toggle span { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .3); transition: transform .22s var(--snappy); }
.toggle[aria-checked="true"] { background: var(--teal); }
.toggle[aria-checked="true"] span { transform: translateX(12px); }
.clip-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: none; }
.clip-list::-webkit-scrollbar { display: none; }
.clip { position: relative; display: flex; align-items: center; height: 32px; border-radius: 8px; padding: 0 8px; gap: 10px; }
.clip + .clip::before { content: ""; position: absolute; left: 34px; right: 0; top: -.5px; height: 1px; background: var(--hair); }
.clip:hover, .clip:focus-within { background: var(--well); }
.clip:hover::before, .clip:hover + .clip::before, .clip:focus-within::before, .clip:focus-within + .clip::before { opacity: 0; }
.clip-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; text-align: left; }
.clip-main:focus-visible { outline-offset: -2px; }
.glyph { width: 20px; height: 20px; flex: none; border-radius: 6px; background: var(--well); color: var(--ink2); display: flex; align-items: center; justify-content: center; }
.glyph .ic { width: 12px; height: 12px; }
.glyph.swatch { border-radius: 5px; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .2); }
.clip-text { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-text.link { color: var(--violet); }
.clip-text.code { font-family: var(--mono); font-size: 11.5px; }
.clip-meta { display: flex; align-items: center; gap: 6px; flex: none; font-size: 10px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.clip-time { width: 62px; text-align: right; }
.clip-pin { color: var(--violet); }
.clip-pin .ic { width: 10px; height: 10px; }
.clip-actions { display: none; gap: 4px; color: var(--ink2); }
.clip-actions .icon-btn .ic { width: 12px; height: 12px; }
.clip:hover .clip-actions, .clip:focus-within .clip-actions { display: flex; }
.clip:hover .clip-time, .clip:focus-within .clip-time, .clip:hover .clip-pin, .clip:focus-within .clip-pin { display: none; }
.clip-copied { display: none; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--teal); }
.clip-copied .ic { width: 10px; height: 10px; }
.clip.copied .clip-copied { display: inline-flex; }
.clip.copied .clip-time, .clip.copied .clip-pin, .clip.copied .clip-actions { display: none !important; }
.clip-empty { flex: 1; display: flex; align-items: center; justify-content: center; margin: 0; font-size: 11.5px; color: var(--ink2); text-align: center; }

/* Timer */
.tp-timer { display: flex; align-items: center; gap: 28px; }
.dial { position: relative; width: 144px; height: 144px; flex: none; }
.dial svg { width: 100%; height: 100%; }
.dial-ring { fill: none; stroke: var(--amber); stroke-width: 4; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 72px 72px; transition: stroke-dashoffset .25s linear; }
.dial-read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial-time { font-size: 30px; font-weight: 500; line-height: 1.05; font-variant-numeric: tabular-nums lining-nums; color: var(--ink3); }
.dial-time.active { color: var(--ink); }
.dial-label { font-size: 10.5px; font-weight: 500; color: var(--ink3); margin-top: 2px; }
.dial-label.paused { color: var(--amber); }
.timer-side { display: flex; flex-direction: column; gap: 10px; }
.presets { display: grid; grid-template-columns: repeat(3, 72px); gap: 6px; }
.preset { height: 30px; border-radius: 9px; background: var(--well); font-size: 12px; font-weight: 500; transition: background-color .15s ease, color .15s ease, transform .2s var(--snappy); }
.preset:hover { background: var(--well-h); color: var(--amber); }
.preset:active { transform: scale(.94); }
.timer-ctl { display: flex; gap: 6px; height: 24px; }

/* Notes */
.tp-notes { display: flex; flex-direction: column; gap: 6px; }
.tp-notes textarea {
  flex: 1; min-height: 0; resize: none; width: 100%;
  padding: 10px; border: 0; border-radius: 12px; background: var(--well);
  font-size: 13px; line-height: 1.5; color: var(--ink);
}
.tp-notes textarea::placeholder { color: var(--ink3); }
.tp-notes textarea:focus-visible { outline: 1.5px solid var(--violet); outline-offset: 0; }
.notes-foot { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink3); flex: none; }
.notes-foot .link-btn { color: var(--ink3); font-size: 10.5px; }
.notes-foot .link-btn:not(:disabled):hover { color: var(--ink); }
.notes-foot .link-btn.done { color: var(--teal); }

/* Mirror */
.tp-mirror { display: flex; align-items: center; justify-content: center; }
.mirror { position: relative; width: 290px; height: 163px; border-radius: 16px; background: var(--well); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mirror video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.mirror-msg { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 18px; text-align: center; }
.mirror-msg .ic { width: 22px; height: 22px; color: var(--ink3); }
.mirror-msg strong { font-size: 12px; font-weight: 600; }
.mirror-msg span { font-size: 10.5px; color: var(--ink2); line-height: 1.4; }
.mirror-msg .pill { margin-top: 6px; }

/* Signature: lens-coating light along the rim of the open notch. */
.rim {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent 50%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 50%, #000 100%);
}
.rim::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.25px;
  --sweep: -60%;
  background: linear-gradient(90deg,
    rgba(142, 124, 255, 0) var(--sweep),
    var(--violet) calc(var(--sweep) + 25%),
    var(--teal) calc(var(--sweep) + 50%),
    var(--amber) calc(var(--sweep) + 75%),
    rgba(255, 181, 71, 0) calc(var(--sweep) + 100%));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.notch[data-open="true"] .rim { opacity: .9; }
.notch[data-open="true"] .rim::before { --sweep: 0%; transition: --sweep .9s ease-out; }

/* Files dragged over the page / over the notch. */
.notch-body::after {
  content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  border: 2px dashed var(--violet); opacity: 0; transition: opacity .15s ease;
}
.notch[data-drop="true"] .notch-body::after,
.notch[data-hint="true"] .notch-body::after { opacity: 1; }

.notch-toast {
  margin: 10px 0 0; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .78); border: 1px solid var(--hair);
  font-size: 12px; color: var(--ink2); white-space: nowrap;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.notch-toast.show { opacity: 1; transform: none; }
.notch-toast:empty { padding: 0; border: 0; }

/* ============ Hero copy ============ */
.hero { position: relative; padding: 0 24px 56px; text-align: center; }
.hint {
  margin: 0; height: 240px; display: flex; flex-direction: column; align-items: center;
  font-size: 13px; color: var(--ink2);
}
.hint-line { width: 1px; height: 22px; margin: 6px 0 8px; background: linear-gradient(rgba(245, 245, 247, 0), rgba(245, 245, 247, .45)); }
.hero-title {
  margin: 0 auto;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(52px, 8.4vw, 116px);
  line-height: .98; letter-spacing: -.025em;
  font-variation-settings: "opsz" 72;
}
.hero-sub { margin: 22px auto 0; max-width: 35em; font-size: 18px; line-height: 1.55; color: rgba(245, 245, 247, .74); }
.hero-ctas { margin-top: 30px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  height: 44px; padding: 0 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color .15s ease, transform .2s var(--snappy);
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--ink); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-quiet { background: rgba(255, 255, 255, .1); color: var(--ink); }
.btn-quiet:hover { background: rgba(255, 255, 255, .16); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; }

.controls { margin: 64px auto 0; max-width: 860px; }
.controls-label { margin: 0 0 14px; font-size: 14px; color: rgba(245, 245, 247, .7); }
.controls-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cc {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 10px 16px; border-radius: 16px;
  background: rgba(0, 0, 0, .38); border: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.cc-slider { flex-direction: column; align-items: stretch; gap: 8px; width: 210px; padding: 10px 14px 12px; }
.cc-slider label { display: flex; align-items: center; gap: 8px; text-align: left; }
.cc-ic { display: inline-flex; color: var(--ink); }
.cc-ic .ic { width: 16px; height: 16px; }
.cc-ic-amber { color: var(--amber); }
.cc-btn { transition: background-color .15s ease, border-color .15s ease, transform .2s var(--snappy); }
.cc-btn:hover { background: rgba(0, 0, 0, .52); }
.cc-btn:active { transform: scale(.97); }
#chargeBtn[aria-pressed="true"] .cc-ic { color: var(--teal); }
#musicBtn[aria-pressed="true"] .cc-ic { color: var(--tint, var(--teal)); }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--ink) var(--v), rgba(255, 255, 255, .2) var(--v)); }
.range-amber::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--amber) var(--v), rgba(255, 255, 255, .2) var(--v)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ink); }
.range-amber::-moz-range-progress { background: var(--amber); }
.range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }
.range:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }

/* ============ Sections ============ */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.section { padding: 128px 0; }
.section + .section { border-top: 1px solid var(--hair); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.split > .lede { position: sticky; top: 40px; }
h2 {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -.018em;
  font-variation-settings: "opsz" 60;
}
h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.15; letter-spacing: -.01em; }
.lede p { margin: 20px 0 0; max-width: 30em; color: var(--ink2); }
code { font-family: var(--mono); font-size: .88em; }
.lede code { color: var(--ink); }

#features .lede { max-width: 760px; margin-bottom: 56px; }
.features { list-style: none; margin: 0; padding: 0; }
.feature { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 40px 0; border-top: 1px solid var(--hair); }
.feature:last-child { border-bottom: 1px solid var(--hair); }
.tabchip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 15px 0 13px; border-radius: 999px;
  background: var(--ink); color: #000; font-size: 15px; font-weight: 600;
}
.tabchip .ic { width: 17px; height: 17px; }
.feature-body p { margin: 12px 0 14px; max-width: 36em; color: var(--ink2); }
.feature-body .link-btn { font-size: 15px; font-weight: 500; }

.wings { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; margin-top: 96px; align-items: start; }
.wings-copy p { margin: 14px 0 0; color: var(--ink2); max-width: 26em; }
.wing-samples { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.wing-samples li { display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--ink2); }
.mini-screen {
  height: 92px; border-radius: 12px; position: relative; overflow: hidden;
  background:
    radial-gradient(90% 90% at 20% 130%, rgba(96, 78, 210, .5), transparent 70%),
    radial-gradient(70% 90% at 90% 130%, rgba(38, 150, 140, .4), transparent 70%),
    linear-gradient(#17171e, #232133);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.mini-screen .notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); --nw: 104px; }
.mini-screen .collapsed { cursor: default; }

/* Automation */
.commands { list-style: none; margin: 0; padding: 0; }
.command { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 22px 0; border-top: 1px solid var(--hair); }
.command:last-child { border-bottom: 1px solid var(--hair); }
.command > code { grid-column: 1 / -1; display: block; padding: 12px 14px; border-radius: 10px; background: var(--well); font-size: 14px; color: var(--ink); overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.command > span { font-size: 15px; color: var(--ink2); }
.command > span code { color: var(--ink); }
.command .pill { height: 30px; padding: 0 16px; font-size: 13px; }
.command .pill.ran { color: var(--teal); }

/* Privacy */
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { position: relative; padding: 18px 0 18px 30px; border-top: 1px solid var(--hair); color: var(--ink2); }
.facts li::before {
  content: ""; position: absolute; left: 2px; top: 25px; width: 12px; height: 7px;
  border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg);
}
.facts strong { color: var(--ink); font-weight: 600; }
.perms { width: 100%; margin-top: 44px; border-collapse: collapse; font-size: 15px; }
.perms caption { caption-side: bottom; text-align: left; padding-top: 12px; font-size: 14px; color: var(--ink3); }
.perms th { text-align: left; font-weight: 500; color: var(--ink3); font-size: 13px; padding: 0 16px 10px 0; }
.perms td { padding: 12px 16px 12px 0; border-top: 1px solid var(--hair); vertical-align: top; }
.perms td:first-child { color: var(--ink); width: 46%; }
.perms td:last-child { color: var(--ink2); }

/* Requirements */
.reqs { margin: 0; }
.reqs > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--hair); }
.reqs > div:last-child { border-bottom: 1px solid var(--hair); }
.reqs dt { color: var(--ink3); font-size: 15px; padding-top: 2px; }
.reqs dd { margin: 0; }

/* FAQ */
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 44px 20px 0; font-size: 18px; font-weight: 500; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 1.5px; background: var(--ink2);
  transition: transform .25s var(--snappy);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover::before, .faq summary:hover::after { background: var(--ink); }
.faq details p { margin: 0 0 22px; max-width: 36em; color: var(--ink2); }

/* Download */
.download { padding: 140px 0 150px; text-align: center; border-top: 1px solid var(--hair); }
.dl-notch {
  position: relative; width: 300px; height: 92px; margin: 0 auto 48px;
  border-radius: 0 0 28px 28px;
}
.rim-static { opacity: .9; }
.rim-static::before { --sweep: 0%; }
.download h2 { font-size: clamp(40px, 6vw, 76px); max-width: 12em; margin: 0 auto 36px; }
.dl-note { margin: 18px 0 0; font-size: 15px; color: var(--ink3); }

.footer { border-top: 1px solid var(--hair); padding: 28px 0 40px; font-size: 14px; color: var(--ink3); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { text-decoration: none; color: var(--ink2); }
.footer a:hover { color: var(--ink); }

/* ============ Narrow screens ============ */
/* Keep menu titles clear of the notch and its wings. */
@media (max-width: 1100px) {
  .mb-wide { display: none; }
}

@media (max-width: 980px) {
  .split, .wings { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split > .lede { position: static; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 719px) {
  :root { --bezel: 6px; }
  body { font-size: 16px; }
  .notch { --nw: 120px; }
  .mb-link, .mb-clock, .mb-status { display: none; }
  .mb-brand span { font-size: 13px; }
  .menubar { padding: 0 8px; }

  /* Header: housing row, then tabs underneath. */
  .xp-head { flex-wrap: wrap; height: auto; }
  .xp-head::before { content: ""; flex: 1; height: var(--nh); }
  .xp-tools { height: var(--nh); padding-right: 12px; gap: 8px; }
  .batt-badge > span:first-child { display: none; }
  .tabs { order: 3; flex: 0 0 100%; height: 34px; justify-content: center; padding: 6px 0 0; }
  .xp-content { padding: 10px 14px 16px; }

  .tp-home { flex-direction: column; }
  .np-art-wrap { width: 92px; height: 92px; }
  .np-meta { height: 92px; }
  .np-transport { gap: 22px; padding-top: 6px; }
  .np-play { width: 30px; height: 30px; }
  .vrule { width: auto; height: 1px; margin: 14px 0 10px; }
  .today { width: auto; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; }
  .today-day { font-size: 17px; }
  .timeline { grid-column: 1 / -1; }
  .tl.tl-extra { display: none; }
  .np-source { display: none; }
  .np-title { font-size: 16px; }

  .shelf-empty { flex-direction: column; text-align: center; gap: 12px; }
  .drop-well { width: 72px; height: 72px; }
  .xp-sub { margin-inline: auto; }

  .clip-head { flex-wrap: wrap; row-gap: 2px; }
  .clip-head .xp-note { order: 5; flex: 0 0 100%; }
  .clip-time { width: 48px; }

  .tp-timer { flex-direction: column; gap: 10px; }
  .dial { width: 124px; height: 124px; }
  .dial-time { font-size: 26px; }
  .presets { grid-template-columns: repeat(3, 1fr); width: 100%; }
  .timer-side { width: 100%; }
  .timer-ctl { justify-content: center; }

  .mirror { width: 100%; height: 190px; }

  .hint { height: 210px; }
  .hero { padding: 0 16px 40px; }
  .hero-sub { font-size: 16.5px; }
  .controls { margin-top: 48px; }
  .controls-row { display: grid; grid-template-columns: 1fr 1fr; }
  .cc-slider { width: auto; }
  .cc-btn { justify-content: center; }

  .wrap { padding: 0 20px; }
  .section { padding: 88px 0; }
  .wing-samples { grid-template-columns: minmax(0, 1fr); }
  .command > code { font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
  .reqs > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dl-notch { width: 220px; height: 70px; }
  .download { padding: 100px 0 110px; }
}

@media (max-width: 380px) {
  .controls-row { grid-template-columns: minmax(0, 1fr); }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .notch-body, .ear, .collapsed, .np-art-wrap, .drop-well .ic { transition-duration: .001ms !important; }
  .notch[data-open="true"] .rim::before { transition: none; }
  .eq span { transform: scaleY(.6); }
}
