/* IntelliOps OS. Three prototype looks (glass, paper, retro) are token sets on :root[data-theme]; the phone
   home screen has its own old-iPhone styling. Without JS, or in "Read as a page", only the document styles apply. */

:root {
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --title-font: var(--ui);
  --accent: #E2890A;
  --accent-ink: #14150F;
  --brand: #0E4C8A;
  --resolved: #1D7A4C;
  --radius: 12px;

  /* the plain document */
  --doc-bg: #F7F6F2;
  --doc-ink: #14150F;
  --doc-muted: #61645A;
  --doc-line: #D3D0C4;
}

/* Glass: dark, translucent, closest to the reference */
:root[data-theme="glass"] {
  /* sized in % of the screen, so the glows look the same on a laptop and a large display */
  --wall: radial-gradient(85% 80% at 88% 8%, rgba(30,104,190,.50), transparent 60%),
          radial-gradient(65% 70% at 6% 96%, rgba(226,137,10,.16), transparent 60%),
          linear-gradient(160deg, #15181d 0%, #0f1114 55%, #0b0c0e 100%);
  --accent: #5B9BE6;
  --accent-ink: #08131f;
  --logo: #fff;
  --text: #ecebe6;
  --muted: #a3a29a;
  --line: rgba(255,255,255,.10);
  --menubar: rgba(20,20,19,.55);
  --menubar-text: #f2f1ec;
  --widget: rgba(38,37,35,.55);
  --widget-border: rgba(255,255,255,.08);
  --win: rgba(32,32,30,.86);
  --win-body: transparent;
  --win-border: rgba(255,255,255,.12);
  --win-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 .5px rgba(0,0,0,.6);
  --title: rgba(48,47,44,.7);
  --field: rgba(255,255,255,.06);
  --dock: rgba(40,40,38,.45);
  --menu: rgba(36,36,34,.92);
  --hover: rgba(255,255,255,.08);
  --blur: saturate(160%) blur(24px);
  --mark: rgba(255,255,255,.05);
}

/* Paper: the Blueprint palette and type as an operating system */
:root[data-theme="paper"] {
  --title-font: "Archivo", var(--ui);
  --ui: "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --wall: linear-gradient(rgba(20,21,15,.045) 1px, transparent 1px) 0 0/24px 24px,
          linear-gradient(90deg, rgba(20,21,15,.045) 1px, transparent 1px) 0 0/24px 24px, #F2F0EA;
  --text: #14150F;
  --muted: #61645A;
  --line: #D3D0C4;
  --menubar: rgba(247,246,242,.85);
  --menubar-text: #14150F;
  --widget: #F7F6F2;
  --widget-border: #D3D0C4;
  --win: #F7F6F2;
  --win-body: #F7F6F2;
  --win-border: #14150F;
  --win-shadow: 6px 6px 0 rgba(20,21,15,.12);
  --title: #ECEAE2;
  --field: #fff;
  --dock: rgba(236,234,226,.85);
  --menu: #F7F6F2;
  --hover: #ECEAE2;
  --blur: none;
  --radius: 4px;
  --mark: rgba(14,76,138,.06);
  --accent: #0E4C8A;
  --accent-ink: #fff;
  --logo: #0E4C8A;
}

/* Retro: early-90s one-bit system */
:root[data-theme="retro"] {
  --title-font: "Silkscreen", var(--mono);
  --ui: var(--mono);
  --wall: repeating-conic-gradient(#9a9a9a 0 25%, #c4c4c4 0 50%) 0 0/4px 4px;
  --text: #000;
  --muted: #444;
  --line: #000;
  --menubar: #fff;
  --menubar-text: #000;
  --widget: #fff;
  --widget-border: #000;
  --win: #fff;
  --win-body: #fff;
  --win-border: #000;
  --win-shadow: 3px 3px 0 #000;
  --title: repeating-linear-gradient(#000 0 1px, #fff 1px 3px);
  --field: #fff;
  --dock: #fff;
  --menu: #fff;
  --hover: #000;
  --blur: none;
  --radius: 0px;
  --accent: #000;
  --accent-ink: #fff;
  --logo: #000;
  --mark: rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.55 var(--ui); color: var(--doc-ink); background: var(--doc-bg); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 9999; background: #fff; color: #000; padding: 8px 12px; }
.sr, .app[hidden-heading] h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* -------------------------------------------------------------------------------------------------------------
   The plain document: no JS, "Read as a page", and the content inside windows */

#content { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.doc-head h1 { font: 800 clamp(40px, 8vw, 64px)/1 "Archivo", var(--ui); margin: 0 0 8px; letter-spacing: -.02em; }
.doc-head p { color: var(--doc-muted); margin: 0 0 40px; }
#content > .app { border-top: 1px solid var(--doc-line); padding: 32px 0; }
#content > .app h2 { font: 800 28px/1.1 "Archivo", var(--ui); margin: 0 0 16px; }
.doc-foot { border-top: 1px solid var(--doc-line); padding-top: 24px; color: var(--doc-muted); font-size: 14px; }

.app h3 { font-size: 17px; margin: 22px 0 6px; }
.app p { margin: 0 0 12px; }
.lede { font: 800 26px/1.15 var(--title-font); letter-spacing: -.01em; margin-bottom: 16px !important; }
.fine { font-size: 13px; opacity: .7; }
.steps { padding-left: 22px; margin: 0 0 16px; }
.steps li { margin-bottom: 8px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px !important; }
.btn { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 8px; border: 0; background: var(--accent);
  color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px currentColor; color: inherit; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cards section { border: 1px solid var(--line, var(--doc-line)); border-radius: calc(var(--radius) - 2px); padding: 14px 16px; }
.cards h3 { margin-top: 0; }
.cards .lead-card { grid-column: 1 / -1; border-color: var(--accent); }
.portrait { float: right; width: 132px; height: 132px; object-fit: cover; border-radius: 50%; margin: 0 0 12px 18px; }
:root[data-theme="paper"] #os .portrait { border-radius: 3px; border: 1.5px solid var(--win-border); }
:root[data-theme="retro"] #os .portrait { border-radius: 0; border: 1.5px solid #000; filter: grayscale(1) contrast(1.25); }
.tags { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line, var(--doc-line)); font-size: 13.5px; }
:root[data-theme="paper"] #os .tags li, :root[data-theme="retro"] #os .tags li { border-radius: var(--radius); }
.cal-embed iframe { width: 100%; height: 520px; border: 0; border-radius: 8px; background: #fff; }
.cal.cal-embed { max-width: none; }
.doc-logo { width: min(420px, 100%); height: auto; display: block; }
.cards p { font-size: 14.5px; }
.quote { margin: 0 0 14px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--field, #fff); border-radius: 4px; }
.quote blockquote { margin: 0 0 8px; }
.quote figcaption { font-size: 13.5px; opacity: .8; }
.paper { background: #fff; color: #14150F; border: 1px solid #d9dde3; border-radius: 3px; padding: 22px 26px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); font-size: 14px; }
.paper-kicker { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #61645A; }
.paper h3 { font-size: 15px; border-bottom: 1px solid #e3e6ea; padding-bottom: 4px; }
.paper table { width: 100%; border-collapse: collapse; font-size: 13px; }
.paper th, .paper td { text-align: left; padding: 5px 6px; border-bottom: 1px solid #eef0f3; }
.paper th { font-weight: 600; color: #61645A; }
.mail-form { display: flex; flex-direction: column; gap: 0; }
.mail-form label { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line, var(--doc-line)); padding: 6px 0; }
.mail-form label span { width: 76px; flex: none; font-size: 13px; opacity: .65; }
.mail-form input, .mail-form textarea { flex: 1; border: 0; background: transparent; color: inherit; font: inherit; padding: 4px 0; outline: none; }
.mail-form input:disabled { opacity: .8; }
.mail-form textarea { resize: vertical; padding-top: 10px; }
.mail-form label.grow { border: 0; }
.mail-form .btn { align-self: flex-end; margin-top: 8px; }
.form-note { font-size: 13.5px; min-height: 1em; color: var(--accent); }
:root[data-theme="retro"] #os .form-note { text-decoration: underline; }

/* calendar app */
.cal { max-width: 380px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head button { background: none; border: 0; font-size: 22px; cursor: pointer; padding: 0 10px; }
.cal-head button:disabled { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: 11px; opacity: .55; padding-bottom: 4px; }
.cal-grid button { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; cursor: default; opacity: .35; }
.cal-grid button.open { opacity: 1; cursor: pointer; background: var(--field, #eee); font-weight: 600; }
.cal-grid button.open:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-grid button.picked { background: var(--accent); color: var(--accent-ink); }
:root[data-theme="retro"] #os .cal-grid button.picked { color: #fff; }

/* terminal app */
.term { font: 13.5px/1.5 var(--mono); color: #d8d8d2; min-height: 100%; cursor: text; }
.term-out div { white-space: pre-wrap; }
.t-accent { color: #f0a54a; }
.t-echo { color: #fff; }
.t-prompt { color: #57e389; white-space: pre; }
.term-line { display: flex; }
.term-input { flex: 1; background: transparent; border: 0; outline: none; color: #fff; font: inherit; caret-color: #f0a54a; padding: 0; }

/* -------------------------------------------------------------------------------------------------------------
   Shell visibility */

#os, #phone, .back-to-os { display: none; }
html.os-ready:not(.page-mode) { overflow: hidden; }
html.os-ready:not(.page-mode) body { background: #000; }
html.os-ready:not(.page-mode) #content { display: none; }
html.os-ready:not(.page-mode) #os { display: block; }
html.page-mode .back-to-os { display: block; position: fixed; right: 16px; bottom: 16px; z-index: 50; padding: 10px 16px;
  border-radius: 999px; border: 0; background: #14150F; color: #F7F6F2; cursor: pointer; font-weight: 600; }
@media (max-width: 760px) {
  html.os-ready:not(.page-mode) #os { display: none; }
  html.os-ready:not(.page-mode) #phone { display: flex; }
}

/* -------------------------------------------------------------------------------------------------------------
   Desktop */

#os { position: fixed; inset: 0; font-family: var(--ui); color: var(--text); font-size: 14px; user-select: none; }
.desktop { position: absolute; inset: 0; }
.wallpaper { position: absolute; inset: 0; background: var(--wall); }
.desk-mark { position: absolute; left: 50%; top: 50%; width: clamp(220px, 18vw, 520px); aspect-ratio: 1122.5 / 705.2; translate: -50% -50%;
  --logo: var(--mark); pointer-events: none; }
/* the official mark, recoloured per look */
.logo-mask { display: block; background: var(--logo, currentColor); -webkit-mask: url(../assets/logo/mark.svg) center/contain no-repeat;
  mask: url(../assets/logo/mark.svg) center/contain no-repeat; }
.mb-logo .logo-mask { width: 26px; height: 16px; }

.menubar { position: absolute; top: 0; left: 0; right: 0; height: 28px; z-index: 1000; display: flex; align-items: center; gap: 2px;
  padding: 0 10px; background: var(--menubar); color: var(--menubar-text); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  font-size: 13.5px; border-bottom: .5px solid var(--line); }
.mb-menu { position: relative; }
.mb-menu > button, .mb-app { background: none; border: 0; padding: 3px 9px; border-radius: 5px; cursor: default; color: inherit; line-height: 1; }
.mb-logo { display: flex; align-items: center; padding: 3px 8px !important; --logo: var(--menubar-text); }
:root[data-theme="paper"] .mb-logo { --logo: var(--brand); }
.mb-app { font-weight: 700; padding-left: 4px; }
.mb-menu > button[aria-expanded="true"], .mb-menu > button:hover { background: var(--hover); }
:root[data-theme="retro"] .mb-menu > button[aria-expanded="true"] { color: #fff; }
.menu-list { position: absolute; top: 25px; left: 0; min-width: 210px; padding: 5px; border-radius: 8px; background: var(--menu);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 .5px var(--win-border);
  display: flex; flex-direction: column; }
.menu-list[hidden] { display: none; }
.menu-list button { text-align: left; background: none; border: 0; padding: 5px 10px 5px 24px; border-radius: 5px; cursor: default; color: var(--text); position: relative; }
.menu-list button[aria-checked="true"]::before { content: "✓"; position: absolute; left: 8px; }
.menu-list .sep-above { margin-top: 5px; }
.menu-list .sep-above::after { content: ""; position: absolute; left: 6px; right: 6px; top: -3px; height: 1px; background: var(--line); }
.menu-list button:hover, .menu-list button:focus-visible { background: #2f7df6; color: #fff; outline: none; }
:root[data-theme="paper"] .menu-list button:hover { background: #14150F; color: #F7F6F2; }
:root[data-theme="retro"] .menu-list button:hover { background: #000; color: #fff; }
:root[data-theme="retro"] .menu-list, :root[data-theme="paper"] .menu-list { border: 1px solid var(--win-border); box-shadow: var(--win-shadow); border-radius: var(--radius); }
.mb-spacer { flex: 1; }
.mb-status, .mb-clock { padding: 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-status { opacity: .75; }

/* widgets */
.widgets { position: absolute; top: 44px; left: 16px; width: 300px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; z-index: 1; }
.widget { text-align: left; border: 1px solid var(--widget-border); background: var(--widget); color: var(--text); border-radius: calc(var(--radius) + 6px);
  padding: 14px 16px; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); cursor: default; min-height: 132px;
  display: flex; flex-direction: column; justify-content: space-between; }
button.widget { cursor: pointer; transition: transform .15s; }
button.widget:hover { transform: translateY(-1px); }
.widget p { margin: 0; }
.w-clock, .w-quote-card, .w-note { grid-column: span 2; }
.w-note { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; min-height: 0; }
.w-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
:root[data-theme="paper"] .w-photo { border-radius: 3px; }
:root[data-theme="retro"] .w-photo { border-radius: 0; filter: grayscale(1) contrast(1.3); image-rendering: pixelated; }
.w-label { font: 600 10.5px/1 var(--ui); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.w-label.red { color: #ff5a4f; }
.w-time { font: 600 34px/1 var(--ui); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 10px 0 !important; }
.w-big { font: 600 40px/1 var(--ui); }
.w-sub { font-size: 12.5px; color: var(--muted); }
.w-title { font: 700 16px/1.25 var(--title-font); margin: 10px 0 !important; }
.w-quote { font-size: 13.5px; line-height: 1.45; margin: 10px 0 !important; }
.w-cal { grid-column: span 2; min-height: 120px; }
:root[data-theme="paper"] .w-time, :root[data-theme="paper"] .w-big { font-family: "Archivo"; font-weight: 800; }
:root[data-theme="retro"] .widget { box-shadow: var(--win-shadow); }
:root[data-theme="retro"] .w-label.red { color: #000; text-decoration: underline; }

/* desktop files */
.desk-files { position: absolute; top: 44px; right: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.desk-file { width: 96px; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 6px; cursor: default; }
.desk-file .icon { width: 54px; height: 54px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.fname { font-size: 12px; font-weight: 500; text-align: center; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); padding: 1px 5px; border-radius: 4px; }
:root[data-theme="paper"] .fname { color: var(--text); text-shadow: none; }
:root[data-theme="retro"] .fname { color: #000; background: #fff; text-shadow: none; border-radius: 0; }
.desk-file.selected .icon { background: rgba(255,255,255,.18); border-radius: 8px; }
.desk-file.selected .fname { background: #2f7df6; color: #fff; }
:root[data-theme="retro"] .desk-file.selected .fname { background: #000; color: #fff; }
.desk-file:focus-visible { outline: 2px solid #2f7df6; }

/* windows */
.win-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: var(--win); color: var(--text);
  border-radius: var(--radius); box-shadow: var(--win-shadow); border: .5px solid var(--win-border); overflow: hidden;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); outline: none; min-width: 300px; min-height: 200px; resize: both; }
.win[hidden] { display: none; }
.win:not(.front) { filter: saturate(.85); }
.win:not(.front) .lights .light { background: rgba(128,128,128,.35) !important; }
.win.zoomed { left: 8px !important; top: 36px !important; width: calc(100vw - 16px) !important; height: calc(100vh - 130px) !important; }
.win-title { height: 38px; flex: none; display: flex; align-items: center; justify-content: center; position: relative; background: var(--title);
  border-bottom: .5px solid var(--line); cursor: default; touch-action: none; }
.win-name { font-weight: 600; font-size: 13px; opacity: .85; }
.lights { position: absolute; left: 13px; display: flex; gap: 8px; }
.light { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; }
.light.close { background: #ff5f57; } .light.min { background: #febc2e; } .light.zoom { background: #28c840; }
.win-body { flex: 1; overflow: auto; padding: 22px 26px; background: var(--win-body); user-select: text; }
.win-body .app h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.win.app-terminal { background: rgba(14,14,13,.94); color: #d8d8d2; }
.win.app-terminal .win-body { padding: 12px 14px; background: transparent; }
.win.app-terminal .win-title { background: #2a2a28; color: #ddd; }
.win.app-runbook .win-body { background: #8b9099; }
:root[data-theme="glass"] .win.app-runbook .win-body { background: #3a3a38; }

:root[data-theme="paper"] .win { border: 1.5px solid var(--win-border); }
:root[data-theme="paper"] .win-name { font: 800 14px "Archivo"; opacity: 1; }
:root[data-theme="paper"] .light { border-radius: 2px; width: 11px; height: 11px; }
:root[data-theme="paper"] .light.close { background: #14150F; } :root[data-theme="paper"] .light.min { background: var(--accent); }
:root[data-theme="paper"] .light.zoom { background: var(--resolved); }
:root[data-theme="paper"] #os .btn { border-radius: 2px; }

:root[data-theme="retro"] .win { border: 1.5px solid #000; }
:root[data-theme="retro"] .win-title { height: 26px; border-bottom: 1.5px solid #000; }
:root[data-theme="retro"] .win-name { background: #fff; padding: 0 10px; font: 400 13px "Silkscreen"; opacity: 1; }
:root[data-theme="retro"] .lights { left: 10px; background: #fff; padding: 0 5px; }
:root[data-theme="retro"] .light { border-radius: 0; width: 13px; height: 13px; background: #fff !important; box-shadow: inset 0 0 0 1.5px #000; }
:root[data-theme="retro"] .light.min, :root[data-theme="retro"] .light.zoom { display: none; }
:root[data-theme="retro"] #os .btn { border-radius: 6px; background: #fff; color: #000; box-shadow: inset 0 0 0 1.5px #000, 0 0 0 1px #fff, 0 0 0 2.5px #000; }
:root[data-theme="retro"] #os .lede { font-family: "Silkscreen"; font-weight: 400; font-size: 22px; }
:root[data-theme="retro"] .win.app-terminal { background: #000; }
:root[data-theme="retro"] .win.app-terminal .win-title { background: repeating-linear-gradient(#fff 0 1px, #000 1px 3px); }

/* dock */
.dock { position: absolute; bottom: 8px; left: 50%; translate: -50% 0; z-index: 900; display: flex; align-items: flex-end; gap: 6px;
  padding: 6px 8px; border-radius: 20px; background: var(--dock); border: .5px solid var(--win-border);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.dock-item { position: relative; width: 54px; height: 54px; padding: 0; border: 0; background: none; cursor: pointer; display: block;
  transition: width .18s, height .18s, margin .18s; }
.dock-item .icon, .p-icon .icon { display: block; width: 100%; height: 100%; }
.dock-item .icon svg, .icon svg { width: 100%; height: 100%; display: block; }
.dock-item:hover { width: 70px; height: 70px; margin-top: -16px; }
.dock-item:hover + .dock-item, .dock-item:has(+ .dock-item:hover) { width: 60px; height: 60px; }
.dock-item .tip { position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 0; white-space: nowrap; padding: 3px 10px;
  border-radius: 6px; background: var(--menu); color: var(--text); font-size: 12.5px; opacity: 0; pointer-events: none; transition: opacity .12s;
  box-shadow: 0 0 0 .5px var(--win-border); }
.dock-item:hover .tip, .dock-item:focus-visible .tip { opacity: 1; }
.dock-item .dot { position: absolute; bottom: -5px; left: 50%; translate: -50% 0; width: 4px; height: 4px; border-radius: 50%; background: var(--text); opacity: 0; }
.dock-item.running .dot { opacity: .8; }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--line); }
:root[data-theme="paper"] .dock, :root[data-theme="retro"] .dock { border-radius: var(--radius); border: 1.5px solid var(--win-border); box-shadow: var(--win-shadow); }
@media (prefers-reduced-motion: reduce) { .dock-item, button.widget { transition: none; } .dock-item:hover { margin-top: 0; width: 54px; height: 54px; } }

/* -------------------------------------------------------------------------------------------------------------
   Phone: old-school iPhone home screen (one look, whatever the desktop look is) */

#phone { --accent: #2f62b3; --accent-ink: #fff; --line: #d9dbde; --field: #f4f5f7; --text: #000; --ui: "Helvetica Neue", Helvetica, Arial, sans-serif; --title-font: var(--ui);
  position: fixed; inset: 0; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: #fff;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(30,104,190,.55), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.08) 0 2px, transparent 2px 4px),
    linear-gradient(#2d2c2a, #141412);
  user-select: none; -webkit-tap-highlight-color: transparent; }
.p-status { height: 22px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; font-size: 12.5px;
  font-weight: 700; background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,.45)); padding-top: env(safe-area-inset-top); box-sizing: content-box; }
.p-status .bars { font-size: 8px; letter-spacing: -1px; margin-left: 3px; }
.batt i { display: inline-block; width: 22px; height: 10px; border: 1px solid #fff; border-radius: 2px; vertical-align: -1px;
  background: linear-gradient(#bdf2a0, #5fc23b) 1px 1px/calc(100% - 2px) calc(100% - 2px) no-repeat; }
.p-home { flex: 1; display: flex; flex-direction: column; padding: 18px 14px 0; overflow: hidden; }
.p-hello { text-align: center; padding: 6px 10px 22px; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.p-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 6px rgba(0,0,0,.6); margin-bottom: 8px; }
.p-kicker { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.p-headline { margin: 6px 0 14px; font-size: 21px; line-height: 1.2; font-weight: 700; }
.p-cta { border: 1px solid rgba(0,0,0,.5); border-radius: 8px; padding: 8px 16px; font-weight: 700; color: #fff; font-size: 14px;
  background: linear-gradient(#6fa3e6, #2f6fc4 50%, #1f5aa8 51%, #2c6cc0); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.6);
  text-shadow: 0 -1px 0 rgba(0,0,0,.35); }
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 18px; justify-items: center; }
.p-icon { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; padding: 0;
  color: #fff; text-decoration: none; cursor: pointer; }
.p-icon .icon { width: 58px; height: 58px; position: relative; border-radius: 13px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.p-icon .icon svg { scale: 1.08; }
/* the gloss */
.p-icon .icon::after { content: ""; position: absolute; inset: 0; border-radius: 13px;
  background: radial-gradient(130% 70% at 50% -18%, rgba(255,255,255,.75) 0 48%, rgba(255,255,255,.12) 49%, transparent 70%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6); }
.p-icon:active .icon { filter: brightness(.6); }
.p-label { font-size: 11.5px; font-weight: 700; text-shadow: 0 1px 2px #000, 0 0 2px #000; white-space: nowrap; }
.p-dots { display: flex; justify-content: center; gap: 8px; margin: auto 0 10px; }
.p-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.p-dots i.on { background: #fff; }
/* the dock shelf */
.p-dock { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; padding: 12px 14px calc(8px + env(safe-area-inset-bottom));
  position: relative; background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.12) 50%, rgba(255,255,255,.08));
  border-top: 1px solid rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.p-dock::before { content: ""; position: absolute; left: 0; right: 0; top: 40%; height: 1px; background: rgba(255,255,255,.25); }
.p-dock .p-icon { position: relative; z-index: 1; }

/* an open app: blue gloss navigation bar, pinstripes behind grouped content */
.p-app { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; color: #000;
  background: repeating-linear-gradient(90deg, #c5ccd4 0 5px, #cbd2d8 5px 8px);
  animation: p-in .32s cubic-bezier(.2,.8,.2,1); }
.p-app[hidden] { display: none; }
.p-app.leaving { animation: p-out .22s ease-in forwards; }
@keyframes p-in { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes p-out { to { transform: scale(.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .p-app, .p-app.leaving { animation: none; } }
.p-nav { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
  padding-top: env(safe-area-inset-top); box-sizing: content-box;
  background: linear-gradient(#b0bccd, #889bb3 50%, #8195af 51%, #6d84a2); border-bottom: 1px solid #2d3642; }
.p-title { margin: 0; font-size: 20px; font-weight: 700; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.5); }
.p-back, .p-nav-pad { width: 74px; }
.p-back { height: 30px; position: relative; margin-left: 12px; padding: 0 8px 0 4px; border: 1px solid #375073; border-left: 0;
  border-radius: 0 6px 6px 0; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 -1px 0 rgba(0,0,0,.4);
  background: linear-gradient(#90a4c0, #5e7fa8 50%, #557aa6 51%, #4a6c9b); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.p-back::before { content: ""; position: absolute; left: -10px; top: 3.5px; width: 21px; height: 21px; rotate: 45deg; border-radius: 3px;
  border: 1px solid #375073; border-top: 0; border-right: 0; background: linear-gradient(135deg, #90a4c0, #4a6c9b);
  clip-path: polygon(0 0, 0 100%, 100% 100%); }
.p-body { flex: 1; overflow: auto; padding: 18px 12px 40px; -webkit-overflow-scrolling: touch; }
.p-body .app { background: #fff; border: 1px solid #a9abae; border-radius: 10px; padding: 16px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(255,255,255,.7); }
.p-body .app h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.p-body .lede { font-family: inherit; font-size: 21px; }
.p-body .btn { border-radius: 8px; color: #fff; border: 1px solid #2c4e7f; text-shadow: 0 -1px 0 rgba(0,0,0,.35);
  background: linear-gradient(#7aa0d8, #3c6fbd 50%, #2f62b3 51%, #3b70c0); }
.p-body .btn.ghost { color: #234; background: linear-gradient(#fff, #e3e6ea); border-color: #9aa3ad; text-shadow: none; box-shadow: none; }
.p-body .cards section { background: #fff; }
.p-body .mail-form label { border-color: #d9dbde; }
.p-app.app-terminal .p-body { background: #000; }
.p-app.app-terminal .p-body .app { background: #000; border-color: #333; }
.p-app.app-terminal .term-input { font-size: 16px; }
:root[data-theme="retro"] #os .win.app-terminal .win-name { color: #000; }
:root[data-theme="retro"] #os .term, :root[data-theme="retro"] #os .t-accent, :root[data-theme="retro"] #os .t-prompt { color: #fff; }
.p-back:focus { outline: none; }
.p-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* -------------------------------------------------------------------------------------------------------------
   Phone style chooser and the classic Android (Holo) style. iOS is the default styling above. */

.a-clock, .a-nav, .p-app-icon { display: none; }

.p-choose { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 18px; text-align: center; color: #fff; background: radial-gradient(120% 70% at 50% 0%, #1d3f66, #0b0c0e 70%);
  font-family: -apple-system, "Helvetica Neue", Roboto, sans-serif; }
.p-choose[hidden] { display: none; }
.p-choose .p-photo { width: 64px; height: 64px; }
.p-choose-title { font-size: 24px; font-weight: 700; margin: 6px 0 4px; }
.p-choose-sub { font-size: 14px; opacity: .75; margin: 0 0 22px; max-width: 300px; }
.p-choose-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 360px; }
.p-choose-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 14px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; }
.p-choose-btn:active { background: rgba(255,255,255,.14); }
.p-choose-btn strong { font-size: 15px; margin-top: 8px; }
.p-choose-btn span:last-child { font-size: 11.5px; opacity: .7; line-height: 1.3; }
.mini { width: 70px; height: 124px; border-radius: 14px; border: 3px solid #222; padding: 14px 8px 6px; display: grid;
  grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 14px; gap: 6px 5px; position: relative; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.mini i { display: block; }
.mini b { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; }
.mini-ios { background: linear-gradient(#2d2c2a, #141412); }
.mini-ios i { border-radius: 4px; background: linear-gradient(#fff6 0 45%, transparent 46%), var(--c, #2a76e8); }
.mini-ios i:nth-child(2) { --c: #f0a330; } .mini-ios i:nth-child(3) { --c: #22a33a; } .mini-ios i:nth-child(5) { --c: #e5483d; }
.mini-ios i:nth-child(6) { --c: #f5c84c; } .mini-ios i:nth-child(7) { --c: #5aa8ff; }
.mini-ios b { background: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.1)); border-top: 1px solid rgba(255,255,255,.5); border-radius: 0 0 10px 10px; }
.mini-android { background: radial-gradient(90% 50% at 50% 0%, #0f3a52, #000 75%); }
.mini-android i { border-radius: 50%; width: 14px; background: var(--c, #33b5e5); justify-self: center; }
.mini-android i:nth-child(2) { --c: #99cc00; } .mini-android i:nth-child(3) { --c: #ffbb33; } .mini-android i:nth-child(5) { --c: #ff4444; }
.mini-android i:nth-child(6) { --c: #aa66cc; } .mini-android i:nth-child(7) { --c: #e9ecf0; }
.mini-android b { height: 14px; background: #000; border-radius: 0 0 10px 10px;
  background-image: radial-gradient(circle, #aaa 1.5px, transparent 2px); background-size: 18px 14px; background-position: center; }

:root[data-phone="android"] #phone { --accent: #33b5e5; --accent-ink: #fff; --line: #333; --field: #262626; --text: #e8e8e8;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(130% 60% at 50% 0%, #0f3a52, transparent 70%), radial-gradient(100% 40% at 50% 100%, #10222f, transparent 70%), #000; }
:root[data-phone="android"] .p-status { background: #000; justify-content: flex-end; gap: 8px; font-weight: 400; font-size: 13px; height: 24px; }
:root[data-phone="android"] .p-status .carrier { margin-right: auto; font-size: 11px; opacity: .6; }
:root[data-phone="android"] .p-status .bars { color: #33b5e5; }
:root[data-phone="android"] .p-status .pct { display: none; }
:root[data-phone="android"] .batt i { width: 9px; height: 15px; border-radius: 1px; vertical-align: -3px; border-color: #ddd;
  background: linear-gradient(#33b5e5, #33b5e5) 1px 3px/calc(100% - 2px) calc(100% - 4px) no-repeat; }
:root[data-phone="android"] .p-status .p-clock { order: 3; }
:root[data-phone="android"] .a-clock { display: block; text-align: center; padding: 6px 0 2px; color: #fff; }
:root[data-phone="android"] .a-clock span { display: block; font: 300 58px/1 Roboto, sans-serif; letter-spacing: -1px; }
:root[data-phone="android"] .a-clock small { display: block; margin-top: 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #33b5e5; }
:root[data-phone="android"] .p-hello { padding: 14px 10px 20px; text-shadow: none; }
:root[data-phone="android"] .p-hello .p-photo { width: 56px; height: 56px; border-width: 0; }
:root[data-phone="android"] .p-kicker { font-size: 11px; color: #8fd5f0; opacity: 1; }
:root[data-phone="android"] .p-headline { font-weight: 300; font-size: 22px; }
:root[data-phone="android"] .p-cta { border: 0; border-radius: 2px; background: #33b5e5; box-shadow: 0 2px 3px rgba(0,0,0,.5);
  text-shadow: none; text-transform: uppercase; font-weight: 500; letter-spacing: .04em; font-size: 13px; padding: 10px 18px; }
:root[data-phone="android"] .p-icon .icon { border-radius: 50%; box-shadow: 0 2px 3px rgba(0,0,0,.6); }
:root[data-phone="android"] .p-icon .icon svg { scale: 1.18; }
:root[data-phone="android"] .p-icon .icon::after { display: none; }
:root[data-phone="android"] .p-label { font-weight: 400; font-size: 12px; text-shadow: 0 1px 2px #000; }
:root[data-phone="android"] .p-dots { opacity: 0; }
:root[data-phone="android"] .p-dock { background: none; box-shadow: none; border-top: 1px solid rgba(255,255,255,.12); padding-bottom: 10px; }
:root[data-phone="android"] .p-dock::before { display: none; }
:root[data-phone="android"] .p-dock .p-label { display: none; }
:root[data-phone="android"] .a-nav { display: flex; justify-content: space-around; flex: none; height: 48px; background: #000;
  padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; position: relative; z-index: 30; }
.a-key { width: 72px; border: 0; background: center/26px no-repeat; opacity: .75; cursor: pointer; }
.a-key:active { background-color: rgba(51,181,229,.3); }
.a-back { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M9 7L4 12l5 5'/%3E%3Cpath d='M4 12h11a5 5 0 0 1 0 10h-3'/%3E%3C/svg%3E"); }
.a-home { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M4 11l8-7 8 7v9H4z'/%3E%3C/svg%3E"); }
.a-recent { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='4' y='8' width='12' height='12'/%3E%3Cpath d='M8 4h12v12'/%3E%3C/svg%3E"); }

:root[data-phone="android"] .p-app { bottom: calc(48px + env(safe-area-inset-bottom)); background: #111; color: #e8e8e8; animation-duration: .2s; }
:root[data-phone="android"] .p-nav { height: 52px; justify-content: flex-start; gap: 6px; padding: 0 10px 0 4px; background: #222;
  border-bottom: 2px solid #33b5e5; }
:root[data-phone="android"] .p-back { width: 22px; height: 40px; margin: 0; padding: 0; font-size: 0; border: 0; border-radius: 0; box-shadow: none;
  background: center/16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b5e5' stroke-width='3'%3E%3Cpath d='M15 4l-8 8 8 8'/%3E%3C/svg%3E"); }
:root[data-phone="android"] .p-back::before { display: none; }
:root[data-phone="android"] .p-app-icon { display: block; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; }
:root[data-phone="android"] .p-app-icon svg { width: 100%; height: 100%; scale: 1.18; }
:root[data-phone="android"] .p-title { font: 400 19px Roboto, sans-serif; text-shadow: none; margin-left: 4px; }
:root[data-phone="android"] .p-nav-pad { display: none; }
:root[data-phone="android"] .p-body { padding: 12px 10px 30px; }
:root[data-phone="android"] .p-body .app { background: #1d1d1d; border: 0; border-radius: 2px; color: #e8e8e8; box-shadow: 0 1px 2px #000;
  font-family: Roboto, sans-serif; }
:root[data-phone="android"] .p-body .lede { font-weight: 300; }
:root[data-phone="android"] .p-body .btn { border: 0; border-radius: 2px; background: #33b5e5; color: #fff; text-shadow: none;
  text-transform: uppercase; font-weight: 500; font-size: 13px; letter-spacing: .04em; }
:root[data-phone="android"] .p-body .btn.ghost { background: #2b2b2b; color: #e8e8e8; box-shadow: inset 0 0 0 1px #444; }
:root[data-phone="android"] .p-body .cards section { background: #242424; border-color: #333; }
:root[data-phone="android"] .p-body .mail-form label { border-color: #333; }
:root[data-phone="android"] .p-body .mail-form input:focus, :root[data-phone="android"] .p-body .mail-form textarea:focus { box-shadow: 0 2px 0 #33b5e5; }
.p-body .portrait { width: 92px; height: 92px; margin-left: 12px; }

/* contact form: honeypot, Turnstile, Sent screen */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:not(:empty) { margin-top: 10px; }
.mail-sent { text-align: center; padding: 30px 10px; outline: none; }
.mail-sent[hidden] { display: none; }
.mail-sent h3 { font-size: 22px; margin: 14px 0 8px; }
.mail-sent p { max-width: 380px; margin: 0 auto 18px !important; }
.sent-check { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--accent);
  -webkit-mask: none; position: relative; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.sent-check::after { content: ""; position: absolute; left: 22px; top: 15px; width: 14px; height: 26px; rotate: 45deg;
  border: solid var(--accent-ink); border-width: 0 5px 5px 0; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sent-check { animation: none; } }
:root[data-theme="retro"] #os .sent-check { border-radius: 0; }
.mail-form[hidden] { display: none; }

/* the privacy policy page */
.legal h2 { font: 800 22px/1.2 "Archivo", var(--ui); margin: 34px 0 10px; }
.legal h3 { font-size: 16px; margin: 18px 0 6px; }
.legal ul { padding-left: 20px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal a { color: #0E4C8A; }
.p-choose-privacy { margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.55); }

/* phone: signal bars, swipeable home pages, Android recents (TASK-2026-00109) */
.p-status .bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; margin-left: 4px; vertical-align: -1px; }
.p-status .bars i { display: block; width: 3px; background: currentColor; border-radius: .5px; }
.p-status .bars i:nth-child(1) { height: 3px; } .p-status .bars i:nth-child(2) { height: 5px; }
.p-status .bars i:nth-child(3) { height: 7.5px; } .p-status .bars i:nth-child(4) { height: 10px; }
:root[data-phone="android"] .p-status .bars { color: #33b5e5; }

.p-home { padding: 18px 0 0; }
.p-pages { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.p-pages::-webkit-scrollbar { display: none; }
.p-page { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; padding: 0 14px; }
.p-page-title { text-align: center; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin: 6px 0 22px;
  text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.p-legal { text-align: center; font-size: 11px; opacity: .55; margin: 30px 0 0; }
.p-dots { margin: 8px 0 10px; }
.p-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; }
.p-dots button.on { background: #fff; }
:root[data-phone="android"] .p-dots { opacity: 1; gap: 4px; }
:root[data-phone="android"] .p-dots button { width: 18px; height: 3px; border-radius: 0; background: rgba(255,255,255,.25); }
:root[data-phone="android"] .p-dots button.on { background: #33b5e5; }

.a-recents { position: fixed; inset: 0 0 calc(48px + env(safe-area-inset-bottom)); z-index: 25; background: rgba(0,0,0,.92);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 20px 18px; font-family: Roboto, sans-serif; color: #fff; }
.a-recents[hidden] { display: none; }
.a-recents-title { margin: 0 0 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #33b5e5; }
.a-recent-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 0; border-radius: 2px; background: #2a2a2a;
  color: #fff; font: 400 16px Roboto, sans-serif; text-align: left; cursor: pointer; box-shadow: 0 2px 4px #000; }
.a-recent-card .icon { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; }
.a-recent-card .icon svg { width: 100%; height: 100%; scale: 1.18; }
.a-recents-empty { text-align: center; opacity: .6; margin: auto 0; }
.a-recents-clear { align-self: center; margin-top: 8px; border: 0; background: none; color: #33b5e5; font: 500 13px Roboto, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.p-choose-privacy { background: none; border: 0; cursor: pointer; }
.win.app-privacy .win-body { font-size: 14.5px; }
/* Desktop booking: tall enough for Cal.com's month and time-slot columns side by side without scrolling */
.win .cal-embed iframe { height: max(480px, calc(100vh - 300px)); }
/* page 2: apps from the top, the legal line down at the bottom, just above the dots */
.p-page { display: flex; flex-direction: column; }
.p-page:not(:first-child) { padding-top: 10px; }
.p-page .p-legal { margin: auto 0 4px; }

/* the date-and-time widget */
.w-when { grid-column: span 2; }
.w-when .w-label .red { color: #ff5a4f; }
.w-when .w-time { margin: 10px 0 2px !important; }
.w-date { font-size: 15px; font-weight: 600; margin: 0 0 10px !important; }
:root[data-theme="paper"] .w-date { font-family: "Archivo"; font-weight: 800; }
:root[data-theme="retro"] .w-when .w-label .red { color: #000; text-decoration: underline; }
html.page-mode .os-h1 { display: none; }
