/* tokencalculator.net — layout + components.
   NMM playbook type rules: bold headlines 100% leading · light/regular body 150% ·
   CTAs bold ALL CAPS pills · left-aligned. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  transition: background 0.15s ease, color 0.15s ease;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-weight: 700; line-height: 1.0; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 16px; }
h2 { font-size: clamp(22px, 3.5vw, 28px); margin: 40px 0 14px; line-height: 1.1; }
h3 { font-size: 18px; margin: 24px 0 10px; line-height: 1.2; }
p, li { margin-bottom: 12px; }
ul, ol { padding-left: 22px; margin-bottom: 16px; }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--bg-deep);
       padding: 2px 6px; border-radius: 4px; }
.light { font-weight: 300; }
.muted { color: var(--text-muted); }

.container { max-width: var(--w-container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--w-narrow); }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo .dot { color: var(--accent); }
.site-nav { display: flex; gap: 20px; flex: 1; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 400; }
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--text); }

/* theme toggle */
.theme-toggle {
  background: var(--bg-raised); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 999px; width: 60px; height: 30px; cursor: pointer; position: relative;
  flex-shrink: 0;
}
.theme-toggle .knob {
  position: absolute; top: 3px; left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-strong); color: #F6F6F6; font-size: 12px; line-height: 22px;
  text-align: center; transition: transform 0.18s ease;
}
[data-theme="light"] .theme-toggle .knob { transform: translateX(29px); }

/* hero */
.hero { padding: 56px 0 40px; }
.hero .sub { color: var(--text-muted); font-weight: 300; font-size: 18px; max-width: 640px; }

/* cards / widget */
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.card a { color: var(--accent-on-raised); }
.widget textarea {
  width: 100%; min-height: 120px; background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px;
  font-family: var(--font-mono); font-size: 14px; resize: vertical;
}
.widget textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.widget .row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; }
.count { font-size: clamp(38px, 6vw, 56px); font-weight: 700; color: var(--accent); line-height: 1; }
.count small { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.widget select, .widget input[type="number"], .widget input[type="text"] {
  background: var(--bg-deep); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 10px 12px; font-family: var(--font-sans); font-size: 14px;
}
.widget label { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; }
.stat-line { font-size: 14px; color: var(--text-muted); margin-top: 12px; }
.stat-line b { color: var(--accent-on-raised); }

/* CTAs & badges */
.cta {
  display: inline-block; padding: 12px 28px; border: 0; border-radius: 999px;
  background: var(--accent-strong); color: #F6F6F6; font-family: var(--font-sans);
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
}
.cta:hover { filter: brightness(1.08); }
.cta.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.badge { background: var(--warm); color: var(--warm-text); font-size: 12px; font-weight: 700;
         padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* tables */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-deep); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* page grid helpers */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 20px; text-decoration: none; color: var(--text); display: block; }
.tile:hover { border-color: var(--accent); }
.tile h3 { margin: 0 0 6px; }
.tile p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* notice */
.notice { border-left: 3px solid var(--accent); background: var(--bg-raised);
          padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0; font-size: 14px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0; background: var(--bg-deep); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; color: var(--text-muted); }
.site-footer a { display: block; color: var(--text); text-decoration: none; font-size: 14px; margin-bottom: 6px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .fine { margin-top: 28px; font-size: 12px; color: var(--text-muted); }

main { padding-bottom: 24px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin: 20px 0 0; }
.breadcrumb a { color: var(--text-muted); }

@media (max-width: 720px) {
  .site-nav { gap: 14px; overflow-x: auto; }
  .site-header .container { gap: 16px; }
}
