/* Nasalis Flow Studio — workspace layout (flat dark theme, no gradients) */
:root {
  --bg: #121210; --panel: #171614; --line: #26241f; --line-2: #3a362f;
  --text: #e9e3d6; --muted: #a39d90; --dim: #8d877b;
  --gold: #d2a86b; --open: #4fae9b;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --top-h: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
a { color: var(--text); }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--gold); color: #0e0d0b; padding: 10px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

.eyebrow { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--dim); }
.eyebrow.gold { color: var(--gold); }
.muted { color: var(--muted); }

/* buttons */
.btn { font: inherit; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-gold { background: var(--gold); color: #0e0d0b; }
.btn-gold:hover { background: #ddb67d; color: #0e0d0b; }
.btn-light { background: var(--text); color: #0e0d0b; }
.btn-light:hover { background: #fff; color: #0e0d0b; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--text); }

/* top bar */
.top { height: var(--top-h); display: flex; align-items: center; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 20px; }
.brand-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--gold); }
.top-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.top-links a { color: var(--muted); text-decoration: none; padding: 12px 0; }
.top-links a:hover { color: var(--text); }

/* three columns */
.shell { display: flex; height: calc(100% - var(--top-h)); min-height: 0; }
.tools { flex: 0 0 240px; padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.tools .eyebrow { padding: 6px 12px 4px; }
.tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tool-btn { font: inherit; font-size: 14px; width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.tool-btn:hover { background: #1d1c19; }
.tool-btn[aria-current="page"] { background: var(--text); color: #0e0d0b; }
.tool-btn[aria-current="page"] .num { color: #5b5246; }
.tool-btn .num { font-family: var(--mono); font-size: 11px; color: var(--dim); width: 22px; }
.tool-btn .label { flex: 1; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-open { background: var(--open); }
.dot-holder { background: var(--gold); }
.legend { margin: auto 0 0; padding: 16px 12px 4px; font-size: 12px; line-height: 1.9; color: var(--dim); }

.stage { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 24px 28px; outline: none; overflow-y: auto; }
.stage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.stage-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stage-title h1 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 38px; line-height: 1.1; }
.stage-title p { margin: 0; max-width: 620px; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tmp-note { font-size: 12px; color: var(--dim); }   /* TEMPORARY, see index.html */

.frame { position: relative; flex: none; min-height: 520px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #0b0b0a; }
.frame iframe { display: block; width: 100%; height: max(520px, calc(100vh - var(--top-h) - 150px)); border: 0; background: #0b0b0a; }   /* then sized to the tool's content */
.frame iframe[hidden] { display: none; }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); font-family: var(--mono); font-size: 13px; }
.soon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 40px; padding: 40px; flex-wrap: wrap; overflow-y: auto; }
.soon img { width: min(360px, 80%); aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; opacity: .9; }
.soon-text { max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.soon-text h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 32px; }
.soon-text p { margin: 0; }

/* about this tool: below the tool, four columns */
.details { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 22px 2px 8px; border-top: 1px solid var(--line); }
.d-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.details p { margin: 0; font-size: 14px; line-height: 1.6; }
.details p, .details li { color: var(--text); text-align: justify; hyphens: auto; }
.steps { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }

/* narrower screens: details panel becomes optional, then tools turn into a scrollable row */
@media (max-width: 1180px) {
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  :root { --top-h: 64px; }
  .top { height: auto; flex-wrap: wrap; padding: 10px 16px 0; gap: 0 12px; }
  .top-links { order: 3; flex: 0 0 100%; margin-left: 0; gap: 20px; font-size: 13px; }
  .top-links a { padding: 8px 0; }
  .brand { margin-right: auto; }
  .shell { flex-direction: column; height: auto; min-height: calc(100% - var(--top-h)); }
  .tools { flex: none; flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .tools .eyebrow, .legend { display: none; }
  .tool-list { flex-direction: row; gap: 6px; }
  .tool-btn { white-space: nowrap; border: 1px solid var(--line-2); }
  .tool-btn .num { display: none; }
  .stage { padding: 18px 16px; }
  .stage-title h1 { font-size: 30px; }
  .frame { flex: none; min-height: 520px; }
  .details { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* collapsible tools list: wide screens only (below 821px the list is already a slim row) */
.shell { position: relative; }
.tools { position: relative; }
.tools-toggle, .tools-show { font: inherit; line-height: 1; cursor: pointer; border: 1px solid var(--line-2); background: #181716; color: var(--muted); }
.tools-toggle:hover, .tools-show:hover { color: var(--text); border-color: var(--gold); }
.tools-toggle { position: absolute; top: 12px; right: 10px; width: 28px; height: 28px; border-radius: 6px; font-size: 18px; }
.tools-show { position: absolute; left: 0; top: 18px; z-index: 2; width: 22px; height: 44px; border-left: 0; border-radius: 0 6px 6px 0; font-size: 18px; }
.tools-show[hidden] { display: none; }
@media (min-width: 821px) { html[data-tools="closed"] .tools { display: none; } }
@media (max-width: 820px) { .tools-toggle, .tools-show { display: none !important; } }

/* holder lock card and "Your tokens" */
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px; text-align: center; }
.lock[hidden] { display: none; }
.lock p { margin: 0; max-width: 420px; color: var(--muted); }
.mine { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mine[hidden] { display: none; }
.mine .eyebrow { margin: 0; }
.mine-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-family: var(--mono); font-size: 12px; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--gold); color: var(--gold); }
