/* Lume: a página é uma janela do LumeNotes.
   Moldura (barra lateral e faixa de cima) por baixo, papel claro por cima, âmbar nos destaques.
   Tokens copiados de src/style.css do LumeNotes. */
:root {
  --accent: #f0a20b;
  --accent-strong: #b87400;
  --accent-soft: rgba(240, 162, 11, 0.24);
  --accent-wash: rgba(240, 162, 11, 0.12);
  --frame: #efeeeb;
  --frame-hover: #e7e5e1;
  --frame-active: #e5e3df;
  --paper: #f9f8f6;
  --paper-edge: rgba(0, 0, 0, 0.045);
  --ink: #1f1e1c;
  --ink-2: #3a3936;
  --muted: #6f6b65;
  --faint: #8f8b85;
  --line: rgba(0, 0, 0, 0.07);
  --field: #f1efec;
  --dark-pill: #1c1b1a;
  --dark-pill-ink: #faf9f7;
  --shadow-paper: 0 0 0 1px var(--paper-edge), 0 1px 2px rgba(60, 50, 30, 0.04), 0 6px 22px rgba(60, 50, 30, 0.05);
  --shadow-shot: 0 18px 50px rgba(30, 25, 15, 0.16), 0 2px 8px rgba(30, 25, 15, 0.07);
  --mono: "Courier Prime", "Courier New", monospace;
  --ui: "Inter", "Ubuntu", "Noto Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="black"]) {
    --accent-strong: #f0a20b; --accent-soft: rgba(240, 162, 11, 0.32);
    --frame: #1d1d1c; --frame-hover: #262624; --frame-active: #2a2a28; --paper: #262625; --paper-edge: rgba(255, 255, 255, 0.05);
    --ink: #ecebe8; --ink-2: #cfcdc9; --muted: #a09d97; --faint: #8b8883; --line: rgba(255, 255, 255, 0.08); --field: #1f1f1e;
    --dark-pill: #ecebe8; --dark-pill-ink: #1c1b1a;
    --shadow-paper: 0 0 0 1px var(--paper-edge), 0 8px 30px rgba(0, 0, 0, 0.25); --shadow-shot: 0 18px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-strong: #f0a20b; --accent-soft: rgba(240, 162, 11, 0.32);
  --frame: #1d1d1c; --frame-hover: #262624; --frame-active: #2a2a28; --paper: #262625; --paper-edge: rgba(255, 255, 255, 0.05);
  --ink: #ecebe8; --ink-2: #cfcdc9; --muted: #a09d97; --faint: #8b8883; --line: rgba(255, 255, 255, 0.08); --field: #1f1f1e;
  --dark-pill: #ecebe8; --dark-pill-ink: #1c1b1a;
  --shadow-paper: 0 0 0 1px var(--paper-edge), 0 8px 30px rgba(0, 0, 0, 0.25); --shadow-shot: 0 18px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
:root[data-theme="black"] {
  --accent-strong: #f0a20b; --accent-soft: rgba(240, 162, 11, 0.34);
  --frame: #0c0c0c; --frame-hover: #161616; --frame-active: #1a1a1a; --paper: #000; --paper-edge: rgba(255, 255, 255, 0.07);
  --ink: #e9e8e5; --ink-2: #c9c7c3; --muted: #98958f; --faint: #7c7a76; --line: rgba(255, 255, 255, 0.1); --field: #111;
  --dark-pill: #e9e8e5; --dark-pill-ink: #000;
  --shadow-paper: 0 0 0 1px var(--paper-edge); --shadow-shot: 0 0 0 1px rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--frame); color: var(--ink);
  font: 400 15.5px/1.6 var(--ui); -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--frame); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- topo ---------- */
.topo {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: flex; align-items: center; gap: 28px; min-height: 56px; background: var(--frame);
  padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
}
.logo { display: block; flex: none; padding: 7px 10px; color: var(--ink); line-height: 0; border-radius: 8px; transition: background .15s; }
.logo:hover { background: var(--frame-hover); }
.logo[aria-current="page"] { background: var(--frame-active); }
.logo svg { width: 118px; height: auto; stroke: none; }
.topo-nav { display: flex; gap: 2px; min-width: 0; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topo-nav a { flex: none; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .15s, background .15s; }
.topo-nav a:hover { color: var(--ink); background: var(--frame-hover); }
.topo-nav a[aria-current="page"] { color: var(--ink); background: var(--frame-active); }

/* tema: clique e segure, arraste até a opção e solte */
.tema { position: relative; flex: none; }
.tema-botao { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: color .15s, background .15s; }
.tema-botao:hover, .tema-botao[aria-expanded="true"] { color: var(--ink); background: var(--frame-hover); }
.tema-botao svg { width: 18px; height: 18px; stroke-width: 1.4; }
.tema-botao .meia { fill: currentColor; stroke: none; }
.tema-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 6; display: grid; gap: 2px; width: 136px; padding: 5px; border-radius: 12px; background: var(--paper); box-shadow: 0 12px 34px rgba(30, 25, 15, .2), 0 0 0 1px var(--line); }
.tema-menu[hidden] { display: none; }
.tema-menu button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); text-align: left; }
.tema-menu button:hover, .tema-menu button.sob { background: var(--frame-hover); }
.tema-menu button[aria-pressed="true"] { font-weight: 500; color: var(--ink); }
.tema-menu i { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.tema-menu button[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--accent); }
.tp-light { background: #f9f8f6; } .tp-dark { background: #262625; } .tp-black { background: #000; }
.tp-auto { background: linear-gradient(90deg, #f9f8f6 50%, #262625 50%); }

.app { display: block; }
.paper {
  position: relative; min-width: 0; background: var(--paper); border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-paper); margin-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px));
}
.page { max-width: 1020px; margin: 0 auto; padding: 44px clamp(20px, 5vw, 64px) 24px; display: grid; gap: 72px; }
.status {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px; padding: 10px clamp(20px, 3vw, 32px);
  background: var(--paper); border-top: 1px solid var(--line); font: 400 13px/1.4 var(--mono); color: var(--faint); z-index: 2;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.status b { font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.status .counts { display: flex; gap: 16px; flex-wrap: wrap; }
.status .hint { font-family: var(--ui); font-size: 12.5px; }

/* ---------- tipografia ---------- */
h1, h2, h3, p { margin: 0; }
h1 { font: 400 clamp(30px, 5.2vw, 50px)/1.14 var(--mono); letter-spacing: -.025em; text-wrap: balance; }
h2 { font: 400 clamp(24px, 3.4vw, 32px)/1.2 var(--mono); letter-spacing: -.02em; text-wrap: balance; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.lead { font-size: clamp(17px, 2vw, 19.5px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.body { color: var(--ink-2); max-width: 62ch; }
.small { font-size: 13.5px; color: var(--muted); }
.label { font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.caret::after { content: ""; display: inline-block; width: .08em; min-width: 2px; height: .95em; margin-left: .1em; vertical-align: -.08em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret::after { animation: none; } html { scroll-behavior: auto; } }
code, .mono { font-family: var(--mono); }
mark { background: var(--accent-soft); color: inherit; border-radius: 2px; padding: 0 .12em; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }

/* ---------- início ---------- */
.hero { display: grid; gap: 22px; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; }
.pillars li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 8px 32px; padding: 18px 0; border-top: 1px solid var(--line); }
.pillars li:last-child { border-bottom: 1px solid var(--line); }
.pillars h3 { font: 400 18px/1.3 var(--mono); letter-spacing: -.01em; }

.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pick {
  display: flex; flex-direction: column; text-decoration: none; border-radius: 14px; background: var(--frame); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s;
}
.pick:hover, .pick:focus-visible { box-shadow: 0 0 0 2px var(--accent); transform: translateY(-2px); }
.pick-wide { flex-direction: row; align-items: stretch; }
.pick-wide .pick-body { flex: 5 1 0; min-width: 0; box-shadow: 1px 0 0 var(--line); padding: 24px; align-content: center; }
.pick-wide .pick-name img { width: 40px; height: 40px; border-radius: 9px; }
.pick-claim { font: 400 clamp(20px, 2.4vw, 24px)/1.25 var(--mono); letter-spacing: -.015em; }
.pick-phones { flex: 7 1 0; min-width: 0; height: 290px; overflow: hidden; display: flex; justify-content: center; gap: 14px; padding: 22px 18px 0; }
.pick-phones img { flex: 0 1 170px; min-width: 0; width: 170px; height: auto; align-self: flex-start; filter: drop-shadow(0 10px 20px rgba(30, 25, 15, .18)); }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kind { display: grid; gap: 10px; align-content: start; padding: 22px; background: var(--frame); border-radius: 14px; min-width: 0; }
.steps { list-style: none; counter-reset: passo; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { counter-increment: passo; display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(passo); font: 400 26px/1 var(--mono); color: var(--accent-strong); }
.pill.accent { background: var(--accent); color: #1c1b1a; box-shadow: none; }
.pill.accent:hover { background: #dd9509; }
.shot.fone img, .shot.recorte img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 14px 26px rgba(30, 25, 15, .18)); }
.shot.mini { max-width: 190px; }
.cartoes { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 24px; padding-top: 8px; }
.shot.cartao { justify-items: center; width: 100%; max-width: 300px; margin-inline: auto; text-align: center; }
.shot.cartao img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 14px 28px rgba(60, 40, 20, .22)); }
.pick-shot { height: 214px; overflow: hidden; padding: 18px 0 0 18px; }
.pick-shot img { max-width: none; width: 560px; border-radius: 8px 0 0 0; box-shadow: var(--shadow-shot); }
.pick-shot.wide img { width: 400px; }
.pick-shot.tall { padding: 18px 18px 0; display: flex; justify-content: center; }
.pick-shot.tall img { width: 210px; border-radius: 12px 12px 0 0; }
.pick-body { display: grid; gap: 8px; padding: 16px 18px 18px; background: var(--paper); flex: 1; align-content: start; box-shadow: 0 -1px 0 var(--line); }
.pick-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.pick-name img { width: 30px; height: 30px; border-radius: 7px; }
.pick-where { font: 400 13px/1.4 var(--mono); color: var(--faint); }

.table-wrap { overflow-x: auto; }
.where { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14.5px; }
.where th, .where td { padding: 14px 16px 14px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.where thead th { border-top: 0; padding-top: 0; font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.where tbody th { font-weight: 600; white-space: nowrap; }
.where tbody th a { text-decoration: none; }
.where tbody th a:hover { color: var(--accent-strong); }
.yes::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.soon { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-strong); font-size: 12.5px; }

/* ---------- página de um app ---------- */
.app-hero { display: grid; gap: 20px; }
.app-id { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.app-id img { width: 52px; height: 52px; border-radius: 12px; }
.app-id small { display: block; font: 400 13px/1.3 var(--mono); color: var(--faint); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s;
}
.pill:hover { background: var(--frame-hover); }
.pill.dark { background: var(--dark-pill); color: var(--dark-pill-ink); box-shadow: none; }
.pill.dark:hover { opacity: .88; background: var(--dark-pill); }

.shot { margin: 0; display: grid; gap: 10px; }
.shot img { border-radius: 12px; box-shadow: var(--shadow-shot); }
.shot.flat img { border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
figcaption { font-size: 13px; color: var(--muted); }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 20px 40px; align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.feature.flip > .stack { order: 2; }
.feature.phone { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.feature.phone.flip { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.feature.slim { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.checks li { position: relative; padding-left: 18px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.file { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--frame); border-radius: 14px; min-width: 0; }
.file-name { font: 400 14.5px/1.35 var(--mono); overflow-wrap: anywhere; color: var(--ink); }
.cmd { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.cmd code { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.copy { flex: none; font-size: 12px; color: var(--muted); padding: 1px 6px; border-radius: 6px; }
.copy:hover { background: var(--frame-hover); color: var(--ink); }
.file .actions { margin-top: auto; }
.hash { font-size: 12.5px; color: var(--muted); }
.hash summary { cursor: pointer; }
.hash code { display: block; margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; color: var(--ink-2); }
.tree { margin: 0; padding: 18px 20px; background: var(--frame); border-radius: 12px; font: 400 14px/1.6 var(--mono); color: var(--ink-2); overflow-x: auto; }
.tree em { font-style: normal; color: var(--faint); }

.brand { color: var(--ink); line-height: 0; }
.brand svg { width: min(304px, 100%); height: auto; stroke: none; }
.signoff .brand svg { width: 182px; }
.signoff { display: grid; gap: 14px; }
.signoff p { font: italic 400 clamp(26px, 3.6vw, 34px)/1.2 var(--mono); letter-spacing: -.02em; }
.signoff span { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.foot { padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- telas menores ---------- */
@media (max-width: 920px) {
  .paper { margin-inline: 0; }
  .picker { grid-template-columns: minmax(0, 1fr); }
  .pick-wide { flex-direction: column; }
  .pick-wide .pick-body { flex: none; box-shadow: 0 1px 0 var(--line); }
  .pick-phones { flex: none; height: 240px; }
  .kinds, .steps { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature.flip, .feature.phone, .feature.phone.flip, .feature.slim { grid-template-columns: minmax(0, 1fr); }
  .feature.flip > .stack { order: 0; }
  .feature.phone .shot, .feature.slim .shot { max-width: 300px; }
}
@media (max-width: 620px) {
  .page { padding-top: 32px; gap: 56px; }
  .pillars li { grid-template-columns: minmax(0, 1fr); }
  .files, .duo, .cartoes { grid-template-columns: minmax(0, 1fr); }
  .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status .hint, .status .counts span:nth-child(2) { display: none; }
  /* as abas ficam atrás da faixa do logo e sobem no mesmo ritmo da rolagem (lume.js define --recolher) */
  html { scroll-padding-top: 112px; }
  .topo { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; isolation: isolate; gap: 12px; background: none; }
  .topo::before { content: ""; position: absolute; inset: 0; background: var(--frame); }
  .logo { position: relative; margin-right: auto; }
  .tema { position: relative; z-index: 1; }
  .topo-nav { position: absolute; top: 100%; left: 0; right: 0; z-index: -1; height: 44px; margin: 0; padding: 0 max(10px, env(safe-area-inset-right, 0px)) 8px max(10px, env(safe-area-inset-left, 0px)); background: var(--frame); transform: translateY(calc(-1 * var(--recolher, 0px))); will-change: transform; }
  .app { padding-top: calc(100px + env(safe-area-inset-top, 0px)); }
}
