*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #FAFAF8;
  --surface:   #FFFFFF;
  --surface2:  #F5F5F2;
  --border:    #E8E8E3;
  --border2:   #D8D8D0;
  --text:      #1A1A18;
  --text2:     #6B6B65;
  --text3:     #A8A8A0;
  --accent:    #FF4D00;
  --accent-bg: #FFF3EF;
  --green:     #00A86B;
  --warn:      #B45309;
  --warn-bg:   #FFFBEB;
  --red:       #DC2626;
  --red-bg:    #FEF2F2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --transition: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── LAYOUT ── */
.shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  display: block;
}
.sidebar-logo-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  line-height: 1.2;
}
.sidebar-logo-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
}

.sidebar-group { padding: 16px 12px 4px; }
.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0 8px;
  margin-bottom: 4px;
  display: block;
}

a.sidebar-item, .sidebar-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text2);
  margin-bottom: 1px;
  text-decoration: none;
}
a.sidebar-item:hover, .sidebar-item:hover { background: var(--surface2); color: var(--text); }
a.sidebar-item.active, .sidebar-item.active { background: var(--accent-bg); color: var(--accent); }

.sidebar-item-title { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
a.sidebar-item.active .sidebar-item-title,
.sidebar-item.active .sidebar-item-title { color: var(--accent); }
.sidebar-item-sub { font-size: 11.5px; font-weight: 400; color: var(--text3); line-height: 1.3; }
a.sidebar-item.active .sidebar-item-sub,
.sidebar-item.active .sidebar-item-sub { color: #FF8A66; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.7;
}

/* ── CONTENT ── */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── PAGE ── */
.page {
  width: 100%;
  max-width: 560px;
  padding: clamp(32px, 5vw, 48px) clamp(20px, 4vw, 40px) 80px;
}

/* ── HERO ── */
.hero { margin-bottom: 28px; }
.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}
.hero-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.15;
  color: var(--text);
}
.hero-accent { color: var(--accent); }
.hero-sub {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  font-weight: 400;
  max-width: 420px;
}

/* ── STACK ── */
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 11px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
}

/* ── FIELD ROW ── */
.field {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  min-height: 54px;
  gap: 12px;
  position: relative;
  transition: background var(--transition);
}
.field:last-child { border-bottom: none; }
.field:focus-within { background: var(--bg); }
.field:focus-within .fl { color: var(--text2); }

.fl {
  font-size: 13px;
  font-weight: 400;
  color: var(--text3);
  width: 140px;
  flex-shrink: 0;
  line-height: 1.4;
  transition: color var(--transition);
}
.fi-wrap { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }

input[type=number], select.sel {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }

select.sel {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A8A8A0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 16px;
  cursor: pointer;
  width: 100%;
}
select.sel option { background: #fff; color: var(--text); }

.utag { font-size: 12px; color: var(--text3); flex-shrink: 0; font-weight: 400; }

/* ── UNIT TOGGLE ── */
.unit-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.unit-toggle button {
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  padding: 4px 9px;
  cursor: pointer;
  transition: all var(--transition);
}
.unit-toggle button.active {
  background: var(--text);
  color: #fff;
  border-radius: 6px;
  margin: 2px;
  padding: 3px 8px;
}

/* ── TOGGLE SWITCH ── */
.tog-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.tog-field:last-child { border-bottom: none; }
.tog-field:hover { background: var(--bg); }
.tog-label { font-size: 13.5px; color: var(--text2); font-weight: 400; }

.pill-switch {
  width: 36px; height: 20px;
  background: var(--border2);
  border-radius: var(--radius-pill);
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.pill-switch::after {
  content: '';
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.pill-switch.on { background: var(--accent); }
.pill-switch.on::after { transform: translateX(16px); }

/* ── RADIO GROUP ── */
.radio-group { display: flex; flex-direction: column; }
.radio-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.radio-opt:last-child { border-bottom: none; }
.radio-opt:hover { background: var(--bg); }
.radio-opt input { flex-shrink: 0; margin-top: 2px; accent-color: var(--accent); }
.radio-opt-text { font-size: 13.5px; color: var(--text); line-height: 1.4; font-weight: 400; }
.radio-opt-sub { font-size: 12px; color: var(--text3); margin-top: 2px; font-weight: 400; }

/* ── BUTTON ── */
.calc-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(255,77,0,.2), inset 0 1px 0 rgba(255,255,255,.12);
}
.calc-btn:hover {
  background: #e64400;
  box-shadow: 0 4px 16px rgba(255,77,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
.calc-btn:active { transform: scale(0.99); }

/* ── ERROR ── */
.err {
  font-size: 13px;
  color: var(--red);
  display: none;
  padding: 10px 14px;
  background: var(--red-bg);
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
}

/* ── RESULTS ── */
.results { display: none; animation: fadeUp .22s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.rrow:last-child { border-bottom: none; }
.rlabel { font-size: 13.5px; font-weight: 400; color: var(--text); }
.rsub { font-size: 12px; color: var(--text3); margin-top: 2px; }
.rval { font-family: var(--mono); font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--text); }
.rrow.na .rval { color: var(--text3); font-weight: 400; font-size: 12.5px; font-family: 'Inter', sans-serif; }

.rtotal { background: var(--accent-bg); border-top: 1px solid #FFD5C0 !important; border-bottom: none; }
.rtotal .rlabel { font-weight: 600; }
.rtotal .rval { font-size: 18px; color: var(--accent); }

.rrow.warn-row .rval { color: var(--warn); }

/* ── LOCATION SPLIT ── */
.loc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.loc-item { background: var(--surface2); padding: 11px 18px 13px; }
.loc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
}
.loc-val { font-family: var(--mono); font-size: 13.5px; font-weight: 500; color: var(--text); }

/* ── DEADLINE ── */
.dl-row { padding: 12px 18px; background: var(--bg); }
.dl-lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}
.dl-val { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.dl-ok { color: var(--green); }
.dl-warn { color: var(--warn); }
.dl-over { color: var(--red); }

/* ── INFO SECTION ── */
.info-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.info-section h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
  margin-top: 20px;
}
.info-section h2:first-child { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
th { text-align: left; padding: 8px 12px; color: var(--text3); border-bottom: 1px solid var(--border); font-weight: 500; background: var(--surface2); font-size: 11.5px; }
td { padding: 7px 12px; border-bottom: 1px solid var(--border); color: var(--text2); }
td:last-child { color: var(--text); font-weight: 500; }
tr:last-child td { border-bottom: none; }

.info-note { margin-top: 10px; font-size: 12px; color: var(--text3); line-height: 1.7; }
.info-note strong { color: var(--text2); font-weight: 500; }

/* ── MOBILE ── */
.mobile-header {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  flex-shrink: 0;
}
.mobile-logo { font-family: 'Inter Tight', sans-serif; font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; text-decoration: none; }
.mobile-menu-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
}
.mobile-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(26,26,24,.4); z-index: 300; backdrop-filter: blur(2px); }
.mobile-nav-overlay.open { display: block; }
.mobile-nav-panel {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 400;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-panel.open { transform: translateX(0); }
.mobile-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-close-title { font-family: 'Inter Tight', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; }
.mobile-close-btn { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--text3); background: none; border: none; cursor: pointer; padding: 4px 6px; }

@media (max-width: 720px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .content { display: block; }
}
@media (max-width: 500px) {
  .fl { width: 110px; font-size: 12px; }
}

/* ── SEO CONTENT ── */
.seo-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.seo-section h2 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 32px;
  line-height: 1.25;
}
.seo-section h2:first-child { margin-top: 0; }
.seo-section h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  margin-top: 20px;
  letter-spacing: -0.2px;
}
.seo-section p {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 12px;
}
.seo-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 14px;
}
.seo-section ul li {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}
.seo-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text3);
  font-size: 12px;
}
.seo-faq { margin-top: 28px; }
.seo-faq-item {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.seo-faq-item:last-child { border-bottom: 1px solid var(--border); }
.seo-faq-q {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.seo-faq-a {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  margin: 0;
}
.seo-highlight {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}
.seo-highlight strong { color: var(--text); }

/* ── FAQ ACCORDION ── */
.faq-section { margin-top: 32px; }
.faq-section-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 12px;
}
.faq-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
  user-select: none;
}
.faq-q:hover { background: var(--surface2); }
.faq-item.open .faq-q { background: var(--surface2); }

.faq-q-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}
.faq-item.open .faq-q-text { color: var(--accent); }

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text3);
}
.faq-item.open .faq-icon {
  background: var(--accent-bg);
  border-color: #FFD5C0;
  color: var(--accent);
  transform: rotate(45deg);
}
.faq-icon svg { width: 10px; height: 10px; }

.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  animation: fadeUp .18s cubic-bezier(0.16,1,0.3,1);
}
.faq-item.open .faq-a { display: block; }
.faq-a p { margin-top: 12px; }
.faq-a p:first-child { margin-top: 0; }
.faq-a strong { color: var(--text); font-weight: 500; }
