/* feelc site — HOST layout only (landing, playground, docs). Tokens, base elements and the
   shared components (simulator, graph, findings, trace) come from theme.css, copied from
   internal/service/web/theme.css by build.mjs (copyTheme) and loaded BEFORE this file. */

/* ---- top nav ---- */
.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--panel2);
  position: sticky; top: 0; z-index: 10;
}
.nav .brand { font-weight: 700; font-size: 17px; color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.nav .brand:hover { text-decoration: none; }
.nav .brand .wordmark { height: 18px; width: auto; }
.nav .brand span { color: var(--muted); font-weight: 400; font-size: 13px; }
.nav .links { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.nav .links a { color: var(--fg); font-size: 14px; }
.nav .links a.cta { background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 6px 12px; border-radius: var(--radius); }
.nav .links a.cta:hover { text-decoration: none; filter: brightness(1.08); }
.docs-nav-toggle { display: none; width: 36px; height: 36px; padding: 0; font-size: 17px; line-height: 1; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg); }

/* ---- landing ---- */
.hero { max-width: 880px; margin: 0 auto; padding: 64px 20px 28px; text-align: center; }
.hero h1 { font-size: 44px; margin: 0 0 14px; letter-spacing: -.02em; }
.hero p.tagline { font-size: 19px; color: var(--muted); margin: 0 auto 26px; max-width: 680px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .actions a {
  padding: 11px 20px; border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--panel); color: var(--fg); font-weight: 600;
}
.hero .actions a.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hero .actions a:hover { text-decoration: none; filter: brightness(1.08); }

.features { max-width: 980px; margin: 30px auto; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.feature h3 { margin: 0 0 8px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.codeblock { max-width: 820px; margin: 30px auto; padding: 0 20px; }
.codeblock pre { background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; overflow-x: auto; font-size: 13px; }
footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 20px; border-top: 1px solid var(--border); margin-top: 40px; }

/* ---- playground layout ---- */
.pg { height: calc(100vh - 53px); display: grid; grid-template-columns: 46% 54%; min-height: 0; }
.pg .col { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 14px; }
.pg .col.left { border-right: 1px solid var(--border); }
.pg .bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pg .bar h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pg .bar .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pg .bar .actions button { padding: 6px 10px; font-size: 13px; }
#source { flex: 1; min-height: 220px; }
#example { max-width: 280px; }
.pg .scroll { overflow-y: auto; min-height: 0; }
.wasm-status { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.wasm-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: rcpulse .8s ease-in-out infinite; }
.wasm-status.ok { color: var(--ok); }
.wasm-status.ok::before { background: var(--ok); animation: none; }
.wasm-status.err { color: var(--err); }
.wasm-status.err::before { background: var(--err); animation: none; }

.report { margin-top: 10px; }
/* playground has no Explain button, so the live-status pill takes the trailing space */
.recompute { margin-left: auto; }

/* ---- docs ---- */
.docs { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 53px); }
.docs aside { border-right: 1px solid var(--border); padding: 20px; background: var(--panel2); overflow-y: auto; }
.docs aside h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.docs aside a { display: block; padding: 5px 8px; border-radius: var(--radius); color: var(--fg); font-size: 14px; }
.docs aside a:hover { background: var(--panel); text-decoration: none; }
.docs aside a.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.docs .content { padding: 28px 40px; max-width: 900px; overflow-x: auto; }
.docs .content h1 { margin-top: 0; }
.docs .content h2 { border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-top: 32px; }
.docs .content pre { background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; overflow-x: auto; font-size: 13px; }
.docs .content code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.docs .content pre code { background: none; padding: 0; }
.docs .content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.docs .content th, .docs .content td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; font-size: 14px; }
.docs .content th { background: var(--panel); }
.docs .content blockquote { border-left: 3px solid var(--accent); margin: 16px 0; padding: 4px 14px; color: var(--muted); }
.docs .content ul, .docs .content ol { padding-left: 22px; margin: 12px 0; }
.docs .content li { margin: 4px 0; }
.docs .content ul.adr-list { list-style: none; padding-left: 0; }
.docs .content ul.adr-list li { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.docs .content ul.adr-list .status { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero { padding: 40px 18px 20px; }
  .hero h1 { font-size: 32px; }
  .hero p.tagline { font-size: 16px; }

  /* playground stacks; each column scrolls */
  .pg { height: auto; grid-template-columns: 1fr; }
  .pg .col { min-height: 0; }
  .pg .col.left { border-right: none; border-bottom: 1px solid var(--border); }
  #source { min-height: 200px; }
  .pg .bar .actions button { min-height: 40px; }

  /* docs sidebar becomes a slide-down drawer toggled by the hamburger */
  .docs-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .docs { grid-template-columns: 1fr; }
  .docs aside { display: none; border-right: none; border-bottom: 1px solid var(--border); }
  body.nav-open .docs aside { display: block; }
  .docs .content { padding: 20px; }
}
