/* Minimal, modern, print‑friendly CSS (no framework) */
:root {
  --bg: #0b1020;
  --panel: #10162b;
  --ink: #eef3ff;
  --muted: #a8b3cf;
  --brand: #5ea1ff;
  --accent: #7ef0c1;
  --border: #223055;
  --shadow: 0 6px 30px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #0b1020 0%, #0e1430 100%);
  color: var(--ink);
  line-height: 1.6;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 3;
  backdrop-filter: blur(8px);
  background: rgba(11,16,32,.72);
  border-bottom: 1px solid var(--border);
}
.site-header .container { padding: 10px 0; display:flex; align-items:center; gap:14px; }
h1 { margin: 0 0 6px; font-size: clamp(22px, 3.2vw, 34px); letter-spacing: .2px; }
.subtitle { margin: 0 0 12px; color: var(--muted); }

.brand { display:flex; align-items:center; gap:10px; text-decoration:none; color: var(--ink); }
.brand img { width:32px; height:32px; }
.brand .wordmark { font-weight:900; letter-spacing:.3px; }

.top-nav { margin-left:auto; display: flex; gap: 10px; flex-wrap: wrap; }
.top-nav a {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
}
.top-nav a:hover { background: var(--panel); }

.hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(94,161,255,.20), transparent 60%),
    radial-gradient(1000px 600px at 120% -10%, rgba(126,240,193,.18), transparent 55%);
}
.hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; padding: 36px 0 28px; }
.hero-copy h2 { margin-top: 0; font-size: clamp(22px, 3.2vw, 32px); }
.bullets { padding-left: 18px; margin: 12px 0 18px; }
.button {
  display: inline-block; margin-right: 10px; margin-top: 6px;
  background: var(--brand); color: #05102a; font-weight: 800;
  padding: 12px 16px; border-radius: 12px; text-decoration: none;
  box-shadow: var(--shadow);
}
.button1 {
  display: inline-block; margin-right: 5px; margin-top: 3px;
  background: var(--brand); color: #05102a; font-weight: 600;
  padding: 6px 9px; border-radius: 6px; text-decoration: none;
  box-shadow: var(--shadow);
}
}
.button.outline {
  background: transparent; color: var(--ink); border: 1px solid var(--border); box-shadow: none;
}
.hero-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow);
}
.hero-card h3 { margin-top: 0; }

.section { padding: 40px 0; }
.section.alt { background: rgba(255,255,255,.02); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { margin: 0 0 14px; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid.two h3 { margin: 0 0 6px; }
.note, .fine { color: var(--muted); }

.worksheet {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 16px;
  box-shadow: var(--shadow);
}
.ws-row { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.ws-row:last-child { border-bottom: 0; }
.ws-left h4 { margin: 0 0 6px; }
.ws-right .inputs { display: inline-flex; gap: 12px; }
.ws-right .input { display: inline-flex; gap: 6px; align-items: center; background: #0c1735; border: 1px solid var(--border); padding: 6px 10px; border-radius: 10px; }
.calc-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.calc-line.total { border-top: 1px dashed var(--border); padding-top: 10px; }
.calc-line.big .box { font-size: 20px; padding: 14px 12px; }
.box { display: inline-block; min-width: 180px; border: 1px solid var(--border); background: #0c1735; padding: 10px 12px; border-radius: 10px; font-weight: 700; text-align: right; }
.caps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 6px; }
.cap { background: #0c1735; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.cap-box { margin-top: 6px; font-size: 20px; font-weight: 800; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; }
table.data thead th { background: #0c1735; }

details { border: 1px solid var(--border); padding: 10px 12px; border-radius: 12px; margin: 10px 0; background: #0c1735; }
details > summary { cursor: pointer; font-weight: 700; }
details.note { background: transparent; }

.page { padding: 28px 0; }
.page h1 { margin-top: 12px; }

.site-footer { border-top: 1px solid var(--border); padding: 18px 0; color: var(--muted); }

/* Responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .grid.two { grid-template-columns: 1fr; }
  .ws-row { grid-template-columns: 1fr; }
  .box { min-width: 140px; }
}

/* Print */
@media print {
  body { background: #fff; color: #111; }
  .site-header, .top-nav, .hero, .button, .site-footer, .table-scroll { display: none !important; }
  .section { padding: 0; }
  .worksheet, details, .cap, .ws-right .input { border-color: #ccc; background: #fff; box-shadow: none; }
  .box { background: #fff; border-color: #aaa; }
}
/* === Calculator enhancement: input-in-box styling (non-destructive) === */
.box {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  padding: .35rem .5rem;
  background: #fff;
}

.box .prefix, .box .suffix {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.box-input {
  border: none;
  outline: none;
  width: 12ch;           /* keeps same visual width as the underline */
  font: inherit;
  color: inherit;
  background: transparent;
  text-align: right;
}

.box-input.percent { width: 6ch; text-align: right; }

/* keep your print look */
@media print {
  .box { border-color: #000; }
  input.box-input::placeholder { color: transparent; }
}
/* ==== Global link color (readable purple) ==== */
:root{
  --link:#4b2ca0;         /* main link */
  --link-hover:#3e238a;   /* hover/focus */
  --link-visited:#4b2ca0; /* keep same tone if you want it "always" purple */
}

a{
  color:var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
a:visited{ color:var(--link-visited); }
a:hover,
a:focus{ color:var(--link-hover); }
a:active{ color:#2f1a74; }

/* Keep nav/footer links white on the dark header/footer */
.site-header .top-nav a,
.site-footer a{
  color:#fff;
}

/* Buttons remain buttons (no purple link color) */
.button,
.button:visited{
  color:inherit;
  text-decoration:none;
}
