/* Vel Tech calculator. Mobile first. System fonts only, so nothing is fetched from other sites. */
:root {
  --bg: #eaeff6;
  --card: #ffffff;
  --ink: #101b2d;
  --muted: #55627a;
  --line: #d3dce9;
  --field: #b9c5d8;
  --brand: #2243d6;
  --crimson: #a81f26;
  --digit: #f2b230;
  --readout: #101b2d;
  --brand-d: #1a34a8;
  --brand-soft: #e3e9fb;
  --navy: #101b2d;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --ok: #0f7a4a;
  --ok-bg: #e0f5ea;
  --ok-mid: #7ccf9f;
  --maybe: #f2a900;
  --maybe-ink: #2b1d00;
  --maybe-bg: #fff2cf;
  --maybe-mid: #f7cf6b;
  --bad: #c62828;
  --bad-bg: #fde4e1;
  --bad-mid: #ef9a94;

  --r: 20px;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--body);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid #3b6cf4; outline-offset: 2px; }

/* ---------- header ---------- */
.top { background: #fff; border-bottom: 3px solid var(--crimson); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.sitename { text-align: right; line-height: 1.1; }
.sitename b { display: block; font: 800 22px var(--display); letter-spacing: -0.02em; color: var(--ink); }
.sitename b i { font-style: normal; color: var(--brand); }
.sitename span { font-size: 12px; color: var(--muted); font-weight: 600; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand img { display: block; height: 48px; width: auto; max-width: 100%; }
.vt-wordmark { font: 800 24px/1 var(--body); color: var(--crimson); }

.hero { padding: 24px 0 8px; }
.hero h1 { margin: 0 0 10px; font: 800 clamp(28px, 8vw, 44px)/1.08 var(--body); letter-spacing: -0.025em; }
.hero h1 span { color: var(--brand); }
.eyebrow { display: inline-block; background: var(--readout); color: var(--digit); font: 800 13px var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 99px; margin-bottom: 12px; }
.lede { margin: 0; color: var(--muted); max-width: 46ch; font-size: 17px; }

/* ---------- regulation ---------- */
.setup { background: var(--card); border-radius: var(--r); padding: 16px; margin: 18px 0; box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(23, 32, 58, .05); display: grid; gap: 12px; }
.setup-title { margin: 0; font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e0e7f2; border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; font: 700 15px var(--body); color: var(--muted); padding: 13px 8px; border-radius: 11px; cursor: pointer; min-height: 48px; }
.seg button[aria-checked="true"] { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(34, 67, 214, .3); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.year { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.reg-note { margin: 0; font-size: 14px; color: var(--muted); }
.reg-note.locked { color: #6b4500; background: var(--maybe-bg); padding: 10px 12px; border-radius: 12px; }

/* ---------- tabs: bottom bar on phones, top bar on wide screens ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff;
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 28px rgba(23, 32, 58, .1);
}
.tabs button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; padding: 6px 2px; min-height: 54px; border-radius: 14px;
  font: 700 12px var(--body); color: var(--muted); cursor: pointer;
}
.tabs button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-selected="true"] { color: #fff; background: var(--readout); }

/* ---------- forms ---------- */
input, select {
  font: 500 16px var(--body); color: var(--ink); background: #fff; width: 100%; min-width: 0;
  border: 1.5px solid var(--field); border-radius: 12px; padding: 12px; min-height: 48px;
}
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(34, 67, 214, .2); }
input::placeholder { color: #98a0b4; font-weight: 400; }
button { font-family: var(--body); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.hint, .muted { font-size: 13px; color: var(--muted); font-weight: 400; }

.primary, .ghost {
  border-radius: 12px; font: 700 15px var(--body); padding: 12px 16px; cursor: pointer; border: 1.5px solid transparent; min-height: 48px;
}
.primary { background: var(--brand); color: #fff; }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.ghost { background: #fff; color: var(--ink); border-color: var(--field); }
.icon-btn { flex: none; border: 1.5px solid var(--field); background: #fff; border-radius: 12px; width: 48px; height: 48px; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-row > button { flex: 1 1 auto; }
.print-row .primary { width: 100%; }

/* ---------- cards ---------- */
.panel-head { margin: 4px 0 14px; }
.panel-head h2 { margin: 0; font: 800 24px/1.2 var(--body); letter-spacing: -0.015em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(23, 32, 58, .05); }
.card h3 { margin: 0 0 4px; font: 800 18px/1.25 var(--body); }
.card > .hint { margin: 0 0 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.entry-row { display: grid; grid-template-columns: 1fr auto 84px; gap: 8px; align-items: center; margin-bottom: 8px; }
.entry-row .slash { color: var(--muted); font-size: 14px; }

.grid-row { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.grid-row:first-child { border-top: 0; padding-top: 0; }
.grid-row.sgpa { grid-template-columns: 1fr 1fr; }
.grid-row.sgpa .name { grid-column: 1 / -1; }
.grid-row.sgpa .rm { grid-column: 2; justify-self: end; }
.grid-row.cgpa { grid-template-columns: 64px 1fr 1fr; align-items: end; }
.grid-row.cgpa .sem { font-weight: 800; padding-bottom: 14px; color: var(--brand); }
.grid-row.two { grid-template-columns: 1fr 1fr; border: 0; padding: 0; }

.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.warn-line { color: #7a4d00; font-size: 14px; margin: 8px 0 0; }
.note-line { font-size: 13px; color: var(--muted); background: #eef2f8; border-radius: 12px; padding: 10px 12px; margin: 10px 0 0; }
.say { font-size: 15px; background: #eef2f8; border-radius: 12px; padding: 12px; margin: 10px 0 0; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 8px; }
table.t th, table.t td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
table.t th { font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.t td.r, table.t th.r { text-align: right; }

/* ---------- result hero ---------- */
.res { background: var(--readout); color: #e9eef8; border-radius: 22px; padding: 18px 18px 16px; margin: 0 0 14px; box-shadow: 0 14px 30px rgba(16, 27, 45, .25); }
.res-label { margin: 0; font: 600 14px var(--body); color: #a9b6cf; }
.res-big { margin: 2px 0 0; font: 800 clamp(52px, 17vw, 84px)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--digit); }
.res-big small { font-size: .38em; font-weight: 700; letter-spacing: 0; margin-left: 6px; color: #a9b6cf; }
.res-sub { margin: 4px 0 0; color: #e9eef8; }
.res-empty { margin: 6px 0 0; color: #a9b6cf; }
.res-meta { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.res-meta li { background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; font-size: 13px; color: #c7d2e6; }
.res-meta b { color: #fff; font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.res-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: rgba(255, 255, 255, .08); }
.res-msg.warn { background: rgba(242, 178, 48, .18); color: #ffe3a1; }
.res-msg.bad { background: rgba(255, 120, 110, .2); color: #ffc9c4; font-weight: 600; }
.res table.t th { color: #a9b6cf; }
.res table.t th, .res table.t td { border-color: #2b3a55; }
.res table.t td { color: #fff; }

/* ---------- attendance ---------- */
.rules { display: grid; gap: 8px; margin-bottom: 14px; }
.rule { border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.rule b { font: 800 20px/1.2 var(--body); letter-spacing: -0.01em; }
.rule span { font-size: 15px; }
.rule.ok { background: var(--ok); color: #fff; }
.rule.maybe { background: var(--maybe); color: var(--maybe-ink); }
.rule.bad { background: var(--bad); color: #fff; }
.marks-strip { font-size: 14px; color: var(--muted); margin: 0 0 14px; background: #fff; border-radius: 14px; padding: 10px 14px; }
.marks-strip b { color: var(--ink); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--field); background: #fff; border-radius: 99px; padding: 10px 18px; min-height: 44px; font: 700 15px var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.target-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.target-row .tin { width: 110px; }

.sum-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; }
.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.cnt { border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.cnt b { font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.cnt.ok { background: var(--ok); color: #fff; }
.cnt.maybe { background: var(--maybe); color: var(--maybe-ink); }
.cnt.bad { background: var(--bad); color: #fff; }

.ac { background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 14px; box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(23, 32, 58, .05); }
.ac-top { display: flex; gap: 8px; margin-bottom: 12px; }
.ac-name { font-weight: 700; }
.ac-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; }
.ac-nums input { font-size: 22px; font-weight: 800; text-align: center; min-height: 56px; padding: 8px 4px; }
.ac-nums label { font-size: 12px; color: var(--muted); line-height: 1.25; }
.ac-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.more { margin-top: 10px; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.more label { margin-top: 6px; }
.ac-out { margin-top: 14px; display: grid; gap: 12px; }
.ac-err { margin: 0; color: var(--bad); font-weight: 600; background: var(--bad-bg); border-radius: 12px; padding: 10px 12px; }

.verdict { display: flex; align-items: center; gap: 14px; border-radius: 16px; padding: 14px 16px; }
.verdict .v-pct small { display: block; font: 700 11px var(--body); letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-bottom: 4px; }
.verdict .v-pct { font: 800 clamp(36px, 11vw, 48px)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.verdict .v-txt { display: grid; gap: 2px; line-height: 1.25; }
.verdict .v-txt b { font-size: 18px; }
.verdict .v-txt span { font-size: 14px; opacity: .95; }
.verdict.ok { background: var(--ok); color: #fff; }
.verdict.maybe { background: var(--maybe); color: var(--maybe-ink); }
.verdict.bad { background: var(--bad); color: #fff; }

.meter { position: relative; padding-bottom: 22px; margin: 6px 4px 0; }
.zones { display: flex; height: 14px; border-radius: 99px; overflow: hidden; }
.z.bad { background: var(--bad-mid); }
.z.maybe { background: var(--maybe-mid); }
.z.ok { background: var(--ok-mid); }
.z.w65 { width: 65%; } .z.w75 { width: 75%; } .z.w10 { width: 10%; } .z.w25 { width: 25%; }
.pin { position: absolute; top: -4px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.tick { position: absolute; top: 18px; font-size: 12px; font-weight: 700; color: var(--muted); transform: translateX(-50%); }
.tick.first { left: 0; transform: none; }
.tick.last { right: 0; left: auto !important; transform: none; }

.act { display: flex; align-items: center; gap: 14px; border-radius: 16px; padding: 14px 16px; border: 2px solid; }
.act.ok { border-color: var(--ok); background: var(--ok-bg); }
.act.warn { border-color: var(--bad); background: var(--bad-bg); }
.act-num { font: 800 clamp(44px, 14vw, 60px)/1 var(--body); letter-spacing: -0.04em; min-width: 1.1ch; text-align: center; font-variant-numeric: tabular-nums; }
.act.ok .act-num { color: var(--ok); }
.act.warn .act-num { color: var(--bad); }
.act-txt { display: grid; gap: 2px; line-height: 1.3; }
.act-txt b { font-size: 18px; }
.act-txt span { font-size: 14px; color: var(--muted); }
.act-extra { margin: -4px 0 0; font-size: 14px; font-weight: 600; color: var(--bad); }

.ac-note { margin: 0; border-radius: 14px; padding: 12px 14px; font-size: 14px; border-left: 6px solid; }
.ac-note b { display: block; font-size: 15px; margin-bottom: 2px; }
.ac-note.maybe { background: var(--maybe-bg); border-color: var(--maybe); color: #5a3d00; }
.ac-note.bad { background: var(--bad-bg); border-color: var(--bad); color: #8b1a14; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.facts.four { grid-template-columns: repeat(2, 1fr); }
.facts div { background: #eef2f8; border-radius: 12px; padding: 10px 12px; display: grid; }
.facts span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ac-plan { margin: 0; font-size: 14px; background: #e3e9fb; border-radius: 12px; padding: 10px 12px; color: #1d2f78; }

.whatif { margin-top: 12px; border-top: 1px dashed var(--field); padding-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.step { display: inline-flex; align-items: center; border: 1.5px solid var(--field); border-radius: 12px; overflow: hidden; }
.step button { width: 44px; height: 44px; border: 0; background: #eef2f8; font-size: 22px; font-weight: 700; cursor: pointer; }
.step output { min-width: 44px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.wi-note { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 400; color: var(--muted); }
.wi-res { margin-left: auto; padding: 6px 12px; border-radius: 99px; font-weight: 800; background: #eef2f8; color: var(--muted); }
.wi-res.ok { background: var(--ok); color: #fff; }
.wi-res.maybe { background: var(--maybe); color: var(--maybe-ink); }
.wi-res.bad { background: var(--bad); color: #fff; }

/* ---------- explainer and footer ---------- */
.how { background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-top: 18px; box-shadow: 0 1px 0 var(--line); }
.how summary { cursor: pointer; font-weight: 700; }
.how h4 { font: 800 16px var(--body); margin: 16px 0 4px; }
.how p, .how li { font-size: 14px; color: #2c3858; margin: 4px 0; }
.how ul { padding-left: 18px; margin: 4px 0; }
.foot { margin: 22px 0 8px; font-size: 13px; color: var(--muted); }
.foot p { margin: 6px 0; }
.foot .dev { font-size: 15px; color: var(--ink); }
.foot .dev b { color: var(--crimson); }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 22px; padding: 20px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 70px rgba(23, 32, 58, .4); color: var(--ink); }
dialog::backdrop { background: rgba(23, 32, 58, .55); }
dialog h2 { font: 800 22px var(--body); margin: 0 0 4px; }
dialog form { display: flex; flex-direction: column; gap: 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- privacy page ---------- */
.doc { background: var(--card); border-radius: var(--r); padding: 20px 18px; margin: 20px 0; box-shadow: 0 1px 0 var(--line); }
.doc h1 { font: 800 clamp(26px, 7vw, 36px)/1.1 var(--body); margin: 0 0 6px; letter-spacing: -0.02em; }
.doc h2 { font: 800 18px var(--body); margin: 22px 0 4px; }
.doc p, .doc li { color: #2c3858; }
.doc .stamp { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.doc .key { background: var(--ok-bg); border-left: 6px solid var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 600; color: #0b4d2f; }
.back { display: inline-block; margin-top: 14px; font-weight: 700; }

/* ---------- display font ---------- */
h1, h2, h3, .panel-head h2, .rule b, .act-num, .cnt b, .doc h1, .doc h2, dialog h2, .how h4 { font-family: var(--display); }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
  body { padding-bottom: 40px; }
  .tabs { position: sticky; top: 8px; bottom: auto; border: 1px solid var(--line); border-radius: 18px; margin: 0 0 16px; box-shadow: 0 10px 30px rgba(23, 32, 58, .1); padding: 6px; }
  .tabs button { flex-direction: row; gap: 8px; font-size: 15px; min-height: 48px; }
  .grid-row.sgpa { grid-template-columns: 1.6fr 90px 100px 130px 48px; align-items: end; }
  .grid-row.sgpa .name, .grid-row.sgpa .rm { grid-column: auto; }
  .rules { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .btn-row > button { flex: 0 0 auto; }
  .print-row .primary { width: auto; }
}

/* ---------- print ---------- */
#printSheet { display: none; }
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; padding: 0 !important; }
  body > *:not(#printSheet) { display: none !important; }
  #printSheet { display: block !important; color: #000; font: 14px/1.45 var(--body); }
  #printSheet .ps-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 3px solid #101b2d; padding-bottom: 10px; margin-bottom: 14px; }
  #printSheet .ps-head img { height: 56px; width: auto; display: block; }
  #printSheet h1 { font: 800 21px var(--body); margin: 0; }
  #printSheet .ps-sub { color: #444; margin-top: 2px; }
  #printSheet h2 { font: 800 15px var(--body); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .05em; color: #2243d6; }
  #printSheet dl { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; margin: 0; }
  #printSheet dt { color: #444; }
  #printSheet dd { margin: 0; font-weight: 700; min-height: 1.4em; border-bottom: 1px dotted #888; }
  #printSheet table { width: 100%; border-collapse: collapse; }
  #printSheet th, #printSheet td { border: 1px solid #888; padding: 5px 8px; text-align: left; vertical-align: top; }
  #printSheet th { background: #e6ecf6; }
  #printSheet .ps-big { font: 800 34px var(--body); margin: 4px 0; }
  #printSheet .ps-foot { margin-top: 18px; font-size: 11px; color: #333; border-top: 1px solid #888; padding-top: 8px; }
  #printSheet .ps-foot b { color: #000; }
  #printSheet tr { break-inside: avoid; }
}

/* ---------- home tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { appearance: none; border: 0; text-align: left; font: inherit; color: var(--ink); background: var(--card); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-height: 190px; box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(16, 27, 45, .07); transition: transform .12s ease, box-shadow .12s ease; }
.tile:active { transform: scale(.98); }
.tile.big { grid-column: 1 / -1; background: var(--readout); color: #e9eef8; min-height: 210px; box-shadow: 0 14px 30px rgba(16, 27, 45, .25); }
.tile-icon { width: 50px; height: 50px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.tile.big .tile-icon { background: rgba(255, 255, 255, .1); color: var(--digit); }
.tile-icon svg { width: 27px; height: 27px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile-title { margin-top: 6px; font: 800 24px/1.1 var(--display); letter-spacing: -0.02em; }
.tile.big .tile-title { font-size: 32px; color: #fff; }
.tile-text { font-size: 14px; color: var(--muted); line-height: 1.35; }
.tile.big .tile-text { color: #c7d2e6; font-size: 15px; }
.tile-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tile-chips i { font-style: normal; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.tile-chips .ok { background: var(--ok); color: #fff; }
.tile-chips .maybe { background: var(--maybe); color: var(--maybe-ink); }
.tile-chips .bad { background: var(--bad); color: #fff; }
.tile-go { margin-top: auto; font-weight: 800; color: var(--brand); padding-top: 6px; }
.tile.big .tile-go { color: var(--digit); }
.back-home { appearance: none; border: 0; background: none; font: 700 15px var(--body); color: var(--brand); padding: 8px 0; margin: 0 0 4px; cursor: pointer; min-height: 44px; }
.explain { margin: 0 0 14px; font-size: 14px; background: #fff; color: #2c3858; box-shadow: 0 1px 0 var(--line); }

/* merged CGPA page: SGPA helper box */
.sg summary { cursor: pointer; font-weight: 800; font-family: var(--display); font-size: 17px; padding: 4px 0; }
.sg[open] summary { margin-bottom: 8px; }

/* ---------- WhatsApp ---------- */
.wa { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 14px 16px; border-radius: 22px; background: #0e7a45; color: #fff; text-decoration: none; box-shadow: 0 10px 24px rgba(14, 122, 69, .3); min-height: 72px; }
.wa:active { transform: scale(.99); }
.wa-logo { flex: none; width: 48px; height: 48px; border-radius: 15px; background: #25d366; display: grid; place-items: center; }
.wa-logo svg { width: 30px; height: 30px; }
.wa-text { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.wa-text b { font: 800 17px var(--display); }
.wa-text span { font-size: 13px; color: #d4f5e2; }
.wa-go { flex: none; font-weight: 800; background: #fff; color: #0e7a45; border-radius: 99px; padding: 8px 14px; font-size: 14px; }

@media (min-width: 760px) {
  .tile { min-height: 210px; }
  .tile.big { min-height: 230px; }
}
@media print { .tiles, .wa, .back-home { display: none !important; } }

/* ---------- CGPA two steps ---------- */
.stepc { padding: 16px; }
.step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.step-head h3 { margin: 0; font-size: 22px; }
.step-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.step-head p b { color: var(--ink); }
.step-no { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--readout); color: var(--digit); font: 800 20px/38px var(--display); text-align: center; }
.tip { margin: 10px 0 0; }
.stepc .res { margin-top: 12px; }
.stepc #cgpaOut .res { margin: 0 0 14px; }
