/* Colours of the app's settings ("Noir" in SettingsView.swift); the terracotta
   only lights the halo, as the neon does around the notch. */
:root {
  --background: #08080a;
  --card: #0e0e11;
  --border: #1a1a1e;
  --divider: #17171b;
  --selected: #17171b;
  --track: #26262b;
  --inset: #050506;
  --primary: #f4f4f5;
  --secondary: #a1a1aa;
  --tertiary: #8a8a94;
  --ink: #09090b;
  --neon: 217, 120, 87;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--background); color: var(--primary); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.04; font-weight: 700; }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
p { margin: 0; }

/* Top bar: brand on the left, links on the right, the closed notch in the middle like on the Mac. */
.topbar { position: sticky; top: 0; z-index: 10; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; background: rgba(8, 8, 10, 0.82); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--divider); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; text-decoration: none; }
.topbar-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); line-height: 0; }
.topbar-notch img { display: block; filter: drop-shadow(0 6px 18px rgba(var(--neon), 0.35)); }
.topbar-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.topbar-nav > a:not(.button) { color: var(--secondary); text-decoration: none; }
.topbar-nav > a:not(.button):hover { color: var(--primary); }
@media (max-width: 1360px) { .topbar-nav > a:not(.button) { display: none; } }
@media (max-width: 640px) { .topbar-notch { display: none; } .topbar { padding: 0 16px; } }

.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; min-width: 44px; height: 32px; padding: 0 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--track); border-radius: 999px; color: var(--secondary); font-size: 12px; font-weight: 600; }
.langs summary::-webkit-details-marker { display: none; }
.langs ul { position: absolute; right: 0; top: 40px; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: 12px; min-width: 150px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.langs a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--secondary); }
.langs a:hover, .langs a[aria-current] { background: var(--selected); color: var(--primary); }

/* Pill buttons of the app: white for the main action, translucent otherwise. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--primary); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.button:hover { background: #ffffff; }
.button.ghost { background: rgba(255, 255, 255, 0.14); color: var(--primary); }
.button.ghost:hover { background: rgba(255, 255, 255, 0.2); }
.button.small { min-height: 34px; padding: 0 16px; font-size: 14px; }
.button:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.eyebrow { color: var(--secondary); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lead { color: var(--secondary); font-size: clamp(17px, 1.6vw, 20px); max-width: 640px; }
.note { color: var(--tertiary); font-size: 14px; }

/* The captures hang from the top edge of their card, like the notch from the screen. */
.edge { display: flex; justify-content: center; align-items: flex-start; line-height: 0; }
.notch { display: block; }
.halo { position: relative; }
.halo::before { content: ""; position: absolute; left: 50%; bottom: -60px; width: 70%; height: 160px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(var(--neon), 0.42), rgba(var(--neon), 0)); filter: blur(24px); pointer-events: none; }
.halo .notch { position: relative; }

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding: 120px 20px 140px; }
.hero h1 { font-size: clamp(44px, 7.4vw, 104px); letter-spacing: -0.045em; line-height: 0.98; }
.hero .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero-shot { margin-top: 72px; width: 100%; }

.block { max-width: 1200px; margin: 0 auto; padding: 110px 20px; display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--divider); }
.block.center { align-items: center; text-align: center; }
.block.narrow { max-width: 820px; }
.block > h2 { margin-top: 4px; }

.closed-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.closed-item, .open-item { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 0 20px 24px; display: flex; flex-direction: column; gap: 22px; overflow: hidden; }
.closed-item { gap: 18px; }
.closed-item .edge { min-height: 56px; }
.closed-item figcaption, .open-item figcaption { color: var(--secondary); font-size: 15px; }
.open-item figcaption strong { color: var(--primary); font-weight: 600; margin-right: 4px; }
.open-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.open-item.wide { grid-column: 1 / -1; }

.badge { padding: 5px 12px; border: 1px solid var(--track); border-radius: 999px; color: var(--secondary); font-size: 13px; font-weight: 600; }
.agents-row { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 40px; }
.agents-open { margin-top: 24px; width: 100%; }

.plans { margin-top: 36px; width: 100%; max-width: 840px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; text-align: left; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.plan.pro { border-color: #3a3a40; box-shadow: 0 30px 90px rgba(var(--neon), 0.1); }
.plan h3 { font-size: 18px; font-weight: 600; color: var(--secondary); letter-spacing: 0; }
.price { font-size: 48px; font-weight: 700; letter-spacing: -0.04em; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--secondary); font-size: 15px; }
.plan li::before { content: "✓"; color: var(--primary); margin-right: 10px; }
.plan .button { margin-top: auto; }

.qa { border-bottom: 1px solid var(--divider); }
.qa summary { list-style: none; cursor: pointer; padding: 22px 32px 22px 0; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 22px; color: var(--tertiary); }
.qa[open] summary::after { content: "−"; }
.qa h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.qa p { padding: 0 0 22px; color: var(--secondary); }

.final { gap: 24px; }
.final h2 { font-size: clamp(32px, 5vw, 64px); }
.foot { max-width: 1200px; margin: 0 auto; padding: 32px 20px 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--divider); color: var(--tertiary); font-size: 14px; }
.missing { min-height: 80vh; justify-content: center; border-top: 0; }

/* Layout editor, after NotchLayoutEditor.swift and the « Encoche ouverte » settings pane. */
.editor { margin-top: 36px; width: 100%; max-width: 720px; align-self: center; text-align: left; }
.ed-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.ed-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--divider); cursor: pointer; }
.ed-row-text { display: flex; flex-direction: column; gap: 2px; }
.ed-row-title { font-size: 15px; font-weight: 500; }
.ed-row-sub { font-size: 13px; color: var(--secondary); }
.ed-switch { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--track); position: relative; cursor: pointer; transition: background 0.2s; }
.ed-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #6b6b73; transition: transform 0.2s, background 0.2s; }
.ed-switch:checked { background: var(--primary); }
.ed-switch:checked::after { transform: translateX(18px); background: var(--ink); }
.ed-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ed-template { position: relative; height: 236px; background: #000; border-radius: 0 0 30px 30px; }
.ed-hardware { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 124px; height: 24px; border: 1px solid rgba(255, 255, 255, 0.22); border-top: 0; border-radius: 0 0 11px 11px; }
.ed-slots { position: absolute; inset: 36px 16px 16px; display: flex; gap: 12px; transition: opacity 0.2s; }
.ed-template.auto .ed-slots { opacity: 0.35; pointer-events: none; }
.ed-auto { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 32px); padding: 7px 16px; border-radius: 999px; background: var(--selected); border: 1px solid var(--track); font-size: 13px; font-weight: 500; text-align: center; }
.ed-slot { position: relative; flex: 1 1 0; min-width: 0; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px dashed rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 12px; cursor: grab; user-select: none; -webkit-user-select: none; }
.ed-slot { overflow: hidden; }
.ed-slot.target { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(244, 244, 245, 0.8); }
.ed-slot.dragging, .ed-chip.dragging { opacity: 0.4; }
.ed-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.ed-glyph { width: 20px; height: 20px; border-radius: 5px; }
.ed-wire { display: flex; flex-direction: column; gap: 8px; }
.ed-wire .row { display: flex; align-items: center; gap: 10px; }
.ed-wire .bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.ed-wire .art { width: 44px; height: 44px; border-radius: 7px; background: rgba(255, 255, 255, 0.12); flex-shrink: 0; }
.ed-wire .stack { display: flex; flex-direction: column; gap: 7px; }
.ed-wire .tick { width: 3px; height: 16px; border-radius: 2px; }
.ed-wire .dot { width: 7px; height: 7px; border-radius: 50%; }
.ed-wire .count { font-size: 26px; font-weight: 600; color: var(--secondary); line-height: 1; }
.ed-wire .pill { width: 74px; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); }
.ed-wire .progress { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); position: relative; }
.ed-wire .progress::after { content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.5); }
.ed-role { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--secondary); }
.ed-role svg { flex-shrink: 0; }
.ed-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--selected); color: var(--secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ed-remove:hover { color: var(--primary); }
.ed-palette { padding: 14px; border-radius: 14px; background: var(--inset); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.ed-palette.target { border-color: rgba(244, 244, 245, 0.8); }
.ed-palette-title { font-size: 13px; font-weight: 500; color: var(--secondary); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-chip { height: 38px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--selected); border: 1px solid var(--track); color: var(--primary); font: 500 14px var(--sans); cursor: grab; }
.ed-chip[aria-disabled="true"] { background: transparent; border: 1px dashed var(--border); color: var(--tertiary); cursor: default; }
.ed-chip[aria-disabled="true"] .ed-glyph { opacity: 0.5; }
.ed-foot { margin-top: 14px; padding: 0 20px; color: var(--tertiary); font-size: 13px; }
@media (max-width: 560px) {
  .ed-template { height: 210px; }
  .ed-slots { inset: 32px 10px 10px; gap: 8px; }
  .ed-slot { padding: 10px; }
  .ed-wire .art { width: 32px; height: 32px; }
  .ed-role span { display: none; }
}

/* Live open notch above the editor, in points as ExpandedNotchContent (NotchView.swift)
   lays it out; .np-zoom scales the points to the page. */
.np-stage { position: relative; display: flex; justify-content: center; margin-bottom: 28px; padding-bottom: 56px; border-top: 1px solid var(--track); overflow: hidden; }
.np-stage::before { content: ""; position: absolute; left: 50%; top: 40px; width: 60%; height: 70%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(var(--neon), 0.5), rgba(var(--neon), 0)); filter: blur(28px); pointer-events: none; }
.np-zoom { position: relative; zoom: 1.3; }
@media (max-width: 820px) { .np-zoom { zoom: 1.05; } }
@media (max-width: 640px) { .np-zoom { zoom: 0.78; } }
@media (max-width: 460px) { .np-zoom { zoom: 0.6; } }
.np-notch { position: relative; color: #fff; font-family: var(--sans); line-height: 1.2; transition: width 0.3s, height 0.3s; }
.np-shape { position: absolute; inset: 0; overflow: visible; }
.np-edge { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; vector-effect: non-scaling-stroke; }
.np-content { position: absolute; inset: 0 20px 10px; display: flex; flex-direction: column; }
.np-top { height: 32px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 201px; }
.np-halves { flex: 1; min-height: 0; display: flex; gap: 18px; }
.np-divider { width: 1px; background: rgba(255, 255, 255, 0.12); flex-shrink: 0; }
.np-module { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.np-header { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255, 255, 255, 0.45); white-space: nowrap; }
.np-row-header { height: 13px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.np-duo-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.np-hweather { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.75); }

.np-player { display: flex; flex-direction: column; gap: 8px; }
.np-track { display: flex; align-items: center; gap: 12px; }
.np-art { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; }
.np-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.np-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-progress { display: flex; flex-direction: column; gap: 3px; }
.np-bar { display: block; height: 4px; margin: 3px 0; border-radius: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.np-bar > span { display: block; height: 100%; border-radius: 2px; background: #fff; }
.np-bar.small { width: 48px; margin: 0; }
.np-times { display: flex; justify-content: space-between; font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.5); }
.np-transport { position: relative; height: 24px; display: flex; justify-content: center; align-items: center; }
.np-buttons { display: flex; align-items: center; gap: 40px; color: rgba(255, 255, 255, 0.85); }
.np-volume { position: absolute; left: 0; top: 0; height: 24px; display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.6); }
.np-output { position: absolute; right: 4px; top: 2px; width: 20px; height: 20px; }

.np-list { display: flex; flex-direction: column; gap: 6px; }
.np-event { height: 30px; display: flex; align-items: center; gap: 8px; }
.np-tick { width: 3px; height: 24px; border-radius: 1.5px; flex-shrink: 0; }
.np-event-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.np-event-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-event-time { font-size: 10.5px; font-weight: 500; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.5); }
.np-join { flex-shrink: 0; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.np-more { height: 13px; font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, 0.4); }

.np-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.np-weather { display: flex; align-items: center; gap: 10px; }
.np-temp { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.05; }
.np-condition { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.np-details { font-size: 10.5px; font-weight: 500; color: rgba(255, 255, 255, 0.45); }
.np-attribution { display: inline-flex; align-items: center; gap: 2px; font-size: 9px; font-weight: 600; color: rgba(255, 255, 255, 0.6); }

.np-agents { display: flex; flex-direction: column; gap: 2px; font: 500 11.5px ui-monospace, "SF Mono", Menlo, monospace; }
.np-agent { height: 22px; display: flex; align-items: center; gap: 7px; }
.np-agent-glyph { width: 10px; flex-shrink: 0; color: rgba(255, 255, 255, 0.35); }
.np-agent-name { min-width: 0; color: rgba(255, 255, 255, 0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-agent-state { margin-left: auto; padding-left: 8px; flex-shrink: 0; color: rgba(255, 255, 255, 0.45); }

.np-unread { display: flex; align-items: center; gap: 10px; }
.np-unread img { width: 33px; height: 33px; border-radius: 7px; }
.np-count { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.np-caption { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.np-open { height: 24px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.7); }

.np-tray { height: 38px; flex-shrink: 0; display: flex; gap: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.np-pinned { flex: 1 1 0; height: 28px; margin-top: 4px; display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.4); }
.np-pinned img { border-radius: 4px; }
.np-tray-gap { width: 1px; }
.np-icons { flex: 1 1 0; display: flex; justify-content: center; gap: 8px; padding-top: 4px; }
.np-tray-icon { position: relative; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.np-tray-icon img { border-radius: 4px; }
.np-tray-icon.focused::after { content: ""; position: absolute; left: 7px; bottom: -1px; width: 14px; height: 2px; border-radius: 1px; background: #fff; }

/* Changelog */
.changelog { gap: 0; border-top: 0; padding-top: 80px; }
.changelog h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.04em; margin-bottom: 40px; }
.release { padding: 32px 0; border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.release header { display: flex; align-items: baseline; gap: 16px; }
.release h2 { font-size: 28px; }
.release time { color: var(--tertiary); font-size: 15px; }
.release p { color: var(--primary); font-weight: 500; }
.release ul { margin: 0; padding-left: 20px; color: var(--secondary); display: flex; flex-direction: column; gap: 6px; }
