/* Almino Tools — shared stylesheet for the free tools at /tools/<tool>.
   Matches the main site (src/app/(frontend)/globals.css): indigo ink, Almino red, cream paper,
   Fraunces headings, Plus Jakarta Sans text, Caveat handwritten eyebrows. Light theme only, like the site. */
:root {
  color-scheme: light;
  --bg: #fbf6ee;          /* paper-50 */
  --surface: #ffffff;     /* paper-0 */
  --surface-2: #fdf0dc;   /* cream-deep */
  --fg: #0e1a2b;          /* ink-900 */
  --ink-700: #33415a;
  --muted: #5d6a80;       /* ink-500 */
  --line: #ece2d2;
  --indigo: #181e4b;      /* indigo-ink */
  --indigo-soft: #eef1fb;
  --red: #e30613;         /* brand */
  --red-ink: #c30511;     /* brand-600 */
  --on-red: #ffffff;
  --coral: #df6951;
  --sun: #f6b23c;
  --ok: #1a7f43;
  --warn: #8a6300;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; /* numbers use tabular figures */
  --font-hand: "Caveat", "Segoe Print", cursive;
  --radius: 14px;
  --shadow-soft: 0 2px 6px rgb(24 30 75 / 0.05), 0 22px 44px -20px rgb(24 30 75 / 0.22);
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-body);
  font-size: 15px; line-height: 1.55; margin: 0;
}
a { color: var(--indigo); }
img { max-width: 100%; }
.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 56px;
}

/* Site header (same identity as the main site) */
.site-top { background: rgb(255 255 255 / 0.96); box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(12px); }
.site-top .wrap { padding-block: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--indigo); }
.logo img { height: 46px; width: auto; }
.logo b { display: block; font-family: var(--font-display); font-size: 20px; line-height: 1; }
.logo small { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.top-links { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; }
.top-links a { color: var(--ink-700); text-decoration: none; }
.top-links a:hover { color: var(--indigo); }
.top-links .top-cta { background: var(--red); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: 0 14px 28px -12px rgb(227 6 19 / .55); }
.top-links .top-cta:hover { background: var(--red-ink); color: #fff; }
@media (max-width: 640px) { .top-links .hide-sm { display: none; } .logo small { display: none; } .logo img { height: 40px; } }

/* Page hero */
.mast {
  background:
    linear-gradient(to right, rgb(24 30 75 / .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(24 30 75 / .05) 1px, transparent 1px),
    linear-gradient(180deg, #fff9f0, #fbf6ee);
  background-size: 32px 32px, 32px 32px, auto;
  border-bottom: 1px solid var(--line);
}
.mast .wrap { padding-block: 26px 30px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: end; justify-content: space-between; }
.crumbs { margin: 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--indigo); }
.crumbs span { margin: 0 6px; color: var(--red); }
.eyebrow { margin: 10px 0 0; font-family: var(--font-hand); font-size: 24px; font-weight: 700; color: var(--coral); line-height: 1; }
.mast h1 { font-family: var(--font-display); font-weight: 600; color: var(--indigo); font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 4px 0 8px; letter-spacing: -.01em; text-wrap: balance; }
.mast p { margin: 0; color: var(--ink-700); max-width: 62ch; }
.mast .formula { font-size: 13px; font-weight: 600; color: var(--indigo); background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-soft); }
.mast .formula b { color: var(--red); font-weight: 700; }
/* Old masthead brand mark (kept harmless if a page still has it) */
.brand { display: none; }

/* Tabs (pill style, like the site's choice chips) */
.tabs { display: flex; gap: 8px; margin: 26px 0 0; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab {
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 9px 18px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-700);
  cursor: pointer; border-radius: 999px; white-space: nowrap;
}
.tab:hover { border-color: var(--indigo); color: var(--indigo); }
.tab[aria-selected="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.tab:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* Grid */
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 820px) { .work { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; min-width: 0; box-shadow: var(--shadow-soft); }
.panel h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--indigo); margin: 0 0 4px; }
.panel .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (max-width: 420px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-700); }
.field .unit { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--fg); font-variant-numeric: tabular-nums;
  background: #fffdf9; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgb(24 30 75 / .12); outline: none; }
.group-label { grid-column: 1 / -1; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--indigo); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }

.btn {
  font: inherit; font-weight: 700; font-size: 14px; letter-spacing: .02em; border-radius: 999px; padding: 11px 20px; min-height: 44px; cursor: pointer;
  border: 1.5px solid var(--indigo); background: transparent; color: var(--indigo);
}
.btn:hover { background: var(--indigo); color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); color: var(--on-red); box-shadow: 0 14px 28px -12px rgb(227 6 19 / .55); }
.btn-red:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Unit switch (concrete calculator) */
.units-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 24px; }
.units-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-700); }

/* Readout */
.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.readout div { background: var(--surface); padding: 12px 14px; }
.readout span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.readout strong { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--indigo); font-variant-numeric: tabular-nums; }
.readout strong small { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted); }

/* Tables */
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 9px 8px; border-bottom: 2px solid var(--indigo); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: top; }
td.num, th.num { text-align: right; }
tfoot td { font-weight: 700; color: var(--indigo); border-top: 2px solid var(--indigo); border-bottom: 0; }
.dia { display: inline-block; font-weight: 700; background: var(--indigo); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12.5px; }
.del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 8px; min-width: 32px; min-height: 32px; border-radius: 999px; }
.del:hover { color: var(--red); background: #fdecec; }
.empty { color: var(--muted); padding: 18px 8px; text-align: center; }

.sheet { margin-top: 20px; }
.sheet-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; max-width: 75ch; }

/* CTA band (navy, like the site's dark sections) */
.cta {
  margin-top: 28px; color: #fff; border-radius: 22px; padding: 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: radial-gradient(55% 80% at 90% 0%, rgb(246 178 60 / .18), transparent 70%), radial-gradient(45% 70% at 0% 100%, rgb(223 105 81 / .16), transparent 70%), var(--indigo);
}
.cta p { margin: 4px 0 0; max-width: 62ch; color: #e2e1f2; }
.cta strong { font-family: var(--font-display); font-weight: 600; font-size: 22px; display: block; }

/* Lead modal */
.modal-back { position: fixed; inset: 0; background: rgb(17 21 58 / .6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); color: var(--fg); border-radius: 22px; max-width: 460px; width: 100%; padding: 24px; max-height: 92vh; overflow: auto; border-top: 5px solid var(--red); box-shadow: 0 30px 60px -20px rgb(17 21 58 / .5); }
.modal h3 { font-family: var(--font-display); font-weight: 600; color: var(--indigo); font-size: 26px; margin: 0 0 4px; }
.modal .fields { grid-template-columns: minmax(0, 1fr); }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--ink-700); display: flex; gap: 8px; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; background: var(--surface); }
.choice label:has(input:checked) { border-color: var(--indigo); background: var(--indigo-soft); color: var(--indigo); }
.choice input { width: auto; accent-color: var(--indigo); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { width: auto; margin-top: 3px; accent-color: var(--red); }
.err { color: var(--red-ink); font-size: 13px; font-weight: 600; min-height: 1em; }
.modal .field .hint { color: var(--muted); font-size: 13px; }
.modal label .hint { font-weight: 500; text-transform: none; letter-spacing: 0; }
#lg-email-fix { margin-top: 6px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--red-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.banner { background: var(--surface-2); border-left: 3px solid var(--sun); padding: 9px 14px; font-size: 13px; margin-top: 16px; border-radius: 0 12px 12px 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--indigo); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow-soft); }

/* Site footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); }
.site-foot .wrap { padding-block: 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; font-size: 13px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--ink-700); text-decoration: none; font-weight: 600; }
.site-foot a:hover { color: var(--red); }

@media (prefers-reduced-motion: no-preference) {
  .tab, .btn, .top-cta { transition: background .15s, color .15s, border-color .15s; }
}

/* Mobile number box: "+91" shown in front, digits only (lead-gate.js cleanMobile). Same as the site's MobileInput. */
.mobile-box { position: relative; }
.mobile-box > span { position: absolute; left: 12px; top: 0; bottom: 0; display: flex; align-items: center; font-weight: 600; color: var(--muted, #6b7280); pointer-events: none; }
.mobile-box > input { padding-left: 48px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
/* Country picker over the "+91 ▾" label: the transparent select stays keyboard- and screen-reader accessible. */
.mobile-box > select { position: absolute; left: 0; top: 0; bottom: 0; width: 74px; opacity: 0; cursor: pointer; z-index: 1; padding: 0; border: 0; }
.mobile-box > select:focus-visible + input { outline: 2px solid var(--indigo); outline-offset: 2px; }
.mobile-box > input { padding-left: 64px; }
.mobile-box > input.cc-long { padding-left: 78px; }
