:root {
  --brown: #452619;
  --orange: #ff7433;
  --orange-hover: #f79a48;
  --paper: #faf9f6;
  --surface: #fff;
  --muted: #785036;
  --line: #ded7c5;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--brown);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }

.shell {
  width: min(100% - 48px, 1040px);
  min-height: 100vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}
.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--brown);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
.site-header nav { display: flex; gap: 24px; }
.site-header nav a, .account, .account button {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.site-header nav a:hover, .account button:hover { color: var(--brown); }
.account { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.account form { margin: 0; }
.account button { padding: 8px 0; border: 0; background: none; cursor: pointer; }
.site-footer {
  margin-top: auto;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.auth-main { width: min(100%, 620px); margin: auto 0; padding: 96px 0; }
.eyebrow {
  margin: 0 0 20px;
  color: var(--brown);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(38px, 5vw, 58px); line-height: 1.1; letter-spacing: -.055em; font-weight: 650; }
h2 { margin-bottom: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
h3 { margin-bottom: 6px; font-size: 16px; letter-spacing: -.02em; }
.lede { max-width: 540px; margin-bottom: 28px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 48px;
  padding: 0 17px;
  background: var(--orange);
  color: var(--brown);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.primary:hover { background: var(--orange-hover); }
.subtle { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.code-panel { width: min(100%, 540px); padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.code-panel span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; }
.code-panel code { color: var(--brown); font-size: clamp(20px, 4vw, 29px); font-weight: 700; letter-spacing: .07em; overflow-wrap: anywhere; }
.code-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.code-panel-heading span { margin: 0; }
.copy-code { min-width: 80px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--brown); font-size: 13px; cursor: pointer; }
.copy-code:hover { border-color: var(--brown); background: var(--paper); }
.copy-code.is-copied { color: #335238; border-color: #335238; }
.copy-code:disabled { cursor: wait; }

.app-main { padding: 72px 0 90px; }
.page-intro { padding-bottom: 62px; }
.page-intro h1 { margin-bottom: 12px; }
.page-intro p { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.section { padding: 32px 0 54px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }
.count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tunnel-list { border-top: 1px solid var(--line); }
.tunnel-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 2.3fr .7fr;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.tunnel-labels { color: var(--muted); font-size: 11px; }
.tunnel-row strong { overflow-wrap: anywhere; }
.tunnel-row span { color: var(--muted); overflow-wrap: anywhere; }
.tunnel-row a { color: var(--brown); overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.tunnel-row a:hover { text-decoration-color: var(--brown); }
.empty-state { padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.step-number { padding-top: 3px; color: var(--brown); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.step p { margin-bottom: 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.command { width: fit-content; max-width: 100%; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--line); background: var(--surface); }
.command span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.command code { display: block; color: var(--brown); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.security-note { max-width: 760px; margin: 26px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 700px) {
  .shell { width: min(100% - 36px, 1040px); }
  .site-header { flex-wrap: wrap; gap: 8px 16px; padding: 16px 0; }
  .site-header nav { order: 3; width: 100%; gap: 20px; }
  .account { margin-left: auto; }
  .account span { display: none; }
  .auth-main { padding: 80px 0; }
  .app-main { padding: 52px 0 65px; }
  .page-intro { padding-bottom: 50px; }
  .tunnel-labels { display: none; }
  .tunnel-row:not(.tunnel-labels) { grid-template-columns: 1fr auto; gap: 6px 14px; }
  .tunnel-row:not(.tunnel-labels) > span:nth-child(4) { grid-column: 2; grid-row: 1; }
  .tunnel-row:not(.tunnel-labels) > span:nth-child(2),
  .tunnel-row:not(.tunnel-labels) > a { grid-column: 1 / -1; }
  .step { grid-template-columns: 30px 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
