/* Rodha CAT percentile predictor.
   Brand: Rodha orange on warm night, Montserrat for display, Inter for reading (as on cat.rodha.co.in).
   No inline styles anywhere: the site's security policy forbids them. */

@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --night: #14100d;
  --night-raised: #211a15;
  --night-line: #3a2f27;
  --paper: #ffffff;
  --peach: #fff3e9;
  --ink: #1b1612;
  --ink-soft: #5e554e;
  --line: #e9ddd2;
  --orange: #f6821f;
  --orange-bright: #ff9a45;
  --orange-deep: #a84a06;
  --on-night: #f8f2ec;
  --on-night-soft: #bdb0a5;
  --danger: #b3261e;
  --danger-on-night: #ffb4a9;
  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 1rem/1.6 var(--text); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); }
h3 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
b { font-weight: 600; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.link { color: var(--orange-deep); text-underline-offset: 3px; }
.link:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.top :focus-visible, .hero :focus-visible, .result-head :focus-visible, .foot :focus-visible { outline-color: var(--on-night); }

.skip { position: absolute; left: 12px; top: -60px; background: var(--paper); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius);
       font: 600 1rem/1 var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s ease; }
.btn-primary { background: var(--orange); color: var(--night); }
.btn-primary:hover { background: var(--orange-bright); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #3a302a; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-text { background: none; border: 0; padding: 8px 2px; font: 500 .9375rem/1.2 var(--text); color: var(--orange-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-text[disabled] { color: var(--ink-soft); text-decoration: none; cursor: default; }

label { display: block; font-weight: 500; font-size: .9375rem; margin: 0 0 6px; }
input[type="text"], input[type="url"], input[type="email"], input[type="tel"] {
  width: 100%; min-height: 52px; padding: 0 14px; font: 400 1rem/1.2 var(--text); color: var(--ink);
  background: var(--paper); border: 1.5px solid #cdbfb2; border-radius: var(--radius); }
input::placeholder { color: #8d8279; }
input:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--ink); }
.error { min-height: 1.4em; margin-top: 8px; font-size: .9375rem; color: var(--danger); }
.error:empty { min-height: 0; margin-top: 0; }

/* ------------------------------------------------------------ top bar */
.top { background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--night-line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand img { width: 92px; }
.top-nav { display: none; gap: 28px; font-size: .9375rem; }
.top-nav a, .top-link { color: var(--on-night-soft); text-decoration: none; }
.top-nav a:hover, .top-link:hover { color: var(--on-night); }
.top-link { font-size: .9375rem; font-weight: 500; padding: 8px 14px; border: 1px solid var(--night-line); border-radius: 8px; color: var(--on-night); }

/* ------------------------------------------------------------ hero: the tool */
.hero { background: var(--night); color: var(--on-night); padding: 40px 0 48px; }
.hero-grid { display: grid; gap: 36px; }
.hero h1 { font-size: clamp(2rem, 7.2vw, 3.25rem); line-height: 1.08; max-width: 15em; }
.lede { margin-top: 16px; max-width: 34em; color: var(--on-night-soft); font-size: 1.0625rem; }
.link-form { margin-top: 28px; }
.link-form label { color: var(--on-night); }
.link-row { display: grid; gap: 10px; }
.link-row input { min-height: 56px; border-color: transparent; }
.link-row .btn { min-height: 56px; }
.hero .error { color: var(--danger-on-night); }
.model-line { margin-top: 14px; font-size: .9375rem; color: var(--on-night-soft); max-width: 36em; }

.hero-art { display: none; }
.find { border-left: 2px solid var(--orange); padding: 2px 0 2px 20px; max-width: 26em; }
.find h2 { font-size: 1.0625rem; letter-spacing: 0; }
.find ol { margin: 12px 0 0; padding-left: 1.25em; color: var(--on-night-soft); font-size: .9375rem; }
.find li { margin-top: 6px; padding-left: 4px; }
.find li::marker { color: var(--orange); font-weight: 600; }

/* ------------------------------------------------------------ result */
.result-head { background: var(--night); color: var(--on-night); padding: 28px 0 36px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 28px; font-size: .875rem; }
.result-meta div { display: flex; gap: 8px; }
.result-meta dt { color: var(--on-night-soft); }
.result-meta dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-title { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; color: var(--on-night-soft); }
.result-title:focus { outline: none; }
.figure { margin-top: 6px; font: 700 clamp(4.5rem, 24vw, 8.5rem)/.95 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--on-night); }
.figure-of { font: 500 1.0625rem/1.4 var(--text); letter-spacing: 0; color: var(--on-night-soft); margin-left: 10px; }
.range-text { margin-top: 12px; font-size: 1.125rem; color: var(--on-night-soft); }
.range-text b { color: var(--on-night); font-variant-numeric: tabular-nums; }
.wait-text { margin-top: 16px; max-width: 36em; font-size: 1.0625rem; color: var(--on-night); }
.stamp { margin-top: 10px; font-size: .9375rem; color: var(--on-night-soft); max-width: 40em; }

.bridge { margin-top: 24px; max-width: 640px; }
.bridge svg { display: block; width: 100%; height: auto; overflow: visible; }
.bridge .deck { stroke: #6b5d52; stroke-width: 2; }
.bridge .hanger { stroke: #57493f; stroke-width: 1; }
.bridge .cable { stroke: var(--orange); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.bridge .tower { stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }
.bridge .you { fill: var(--on-night); stroke: var(--night); stroke-width: 3; }
.bridge .you-line { stroke: var(--on-night); stroke-width: 1.5; }
.bridge text { font: 500 13px var(--text); fill: var(--on-night-soft); font-variant-numeric: tabular-nums; }
.bridge text.val { font-weight: 600; font-size: 15px; fill: var(--on-night); }
@media (prefers-reduced-motion: no-preference) {
  .bridge .cable { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease-out .15s forwards; }
  .bridge .you, .bridge .you-line { opacity: 0; animation: appear .35s ease-out 1.05s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

.result-body { padding: 36px 0 48px; }
.sections { width: 100%; margin-top: 18px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sections thead { display: none; }
.sections tbody tr, .sections tfoot tr { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 10px; align-items: baseline; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.sections tfoot tr { border-top: 2px solid var(--ink); }
.sections th[scope="row"] { grid-column: 1 / span 2; text-align: left; font: 600 1.125rem/1.3 var(--display); padding: 0; }
.sections td { padding: 0; }
.sections td.pct { grid-column: 3 / span 2; text-align: right; font: 700 1.625rem/1.1 var(--display); letter-spacing: -0.02em; }
.sections td.col-pct:not(.pct) { grid-column: 1 / -1; text-align: right; color: var(--ink-soft); font-size: .9375rem; }
.sections td.col-pct:not(.pct)::before { content: "likely "; }
.sections td:not(.col-pct) { display: flex; flex-direction: column-reverse; margin-top: 16px; font-weight: 500; }
.sections td:not(.col-pct)::before { content: attr(data-label); color: var(--ink-soft); font-size: .8125rem; font-weight: 400; }
.sections.no-pct .col-pct { display: none; }
.sections.no-pct th[scope="row"] { grid-column: 1 / -1; }
.notes { margin: 18px 0 0; padding: 0; list-style: none; }
.notes li { padding: 12px 14px; background: var(--peach); border-left: 3px solid var(--orange); font-size: .9375rem; margin-top: 8px; }
.keep { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 40em; }
.keep-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 16px; }
.copied { margin-top: 10px; font-size: .9375rem; color: var(--ink-soft); min-height: 1.4em; }

/* ------------------------------------------------------------ page sections */
main { display: flex; flex-direction: column; }
.has-result #how, .has-result #rodha { display: none; }
.has-result #next { order: 1; }
.has-result #method { order: 2; background: var(--paper); }
.has-result #faq { order: 3; border-top: 1px solid var(--line); }

.band { padding: 56px 0; }
.band-peach { background: var(--peach); }
.band p { color: var(--ink-soft); }
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; display: grid; gap: 28px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
.steps li::before { content: counter(step); grid-row: 1 / span 2; width: 44px; height: 44px; display: grid; place-items: center;
                    font: 600 1.125rem/1 var(--display); color: var(--orange-deep); border: 1.5px solid var(--orange); border-radius: 50%; }
.steps h3 { align-self: center; }
.steps p { grid-column: 2; margin-top: 4px; max-width: 30em; }

.method-grid { display: grid; gap: 28px; }
.method-lede { margin-top: 14px; max-width: 30em; font-size: 1.0625rem; }
.method-points { display: grid; gap: 22px; }
.method-points > div { padding-top: 18px; border-top: 1px solid #edd5bf; }
.method-points p { margin-top: 6px; max-width: 36em; }

.proof { margin: 28px 0 24px; display: grid; gap: 24px; }
.proof div { display: flex; flex-direction: column; }
.proof dt { font: 700 2.5rem/1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.proof dd { margin: 8px 0 0; color: var(--ink-soft); max-width: 22em; }

.next { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.next a { display: block; height: 100%; padding: 22px 22px 24px; background: var(--paper); border: 1px solid #f0dcc8; border-radius: 14px; text-decoration: none; transition: border-color .15s ease; }
.next a:hover { border-color: var(--orange); }
.next h3 { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.next p { margin-top: 12px; font-size: .9375rem; }

.faq-wrap { display: grid; gap: 20px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 500; font-size: 1.0625rem; list-style: none; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
                      transform: translateY(-70%) rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; max-width: 42em; }

/* ------------------------------------------------------------ footer */
.foot { background: var(--night); color: var(--on-night-soft); padding: 40px 0 28px; font-size: .9375rem; }
.foot-grid { display: grid; gap: 24px; }
.foot img { width: 86px; margin-bottom: 10px; }
.foot address, .foot nav { display: grid; gap: 8px; font-style: normal; align-content: start; }
.foot a { color: var(--on-night); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--night-line); font-size: .875rem; }

/* ------------------------------------------------------------ dialog */
dialog { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; border-radius: 18px 18px 0 0; background: var(--paper); color: var(--ink);
         max-height: 94dvh; overflow: auto; }
dialog::backdrop { background: rgba(20, 16, 13, .66); }
.panel { padding: 28px 20px 28px; }
.panel h2 { font-size: 1.375rem; padding-right: 40px; }
.panel-lede { margin: 8px 0 20px; color: var(--ink-soft); }
.panel label { margin-top: 14px; }
.panel .btn-block { margin-top: 18px; }
.dlg-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; color: var(--ink-soft); cursor: pointer; }
.dlg-close:hover { background: #f3ebe3; color: var(--ink); }
.phone-row { display: grid; grid-template-columns: auto 1fr; }
.phone-code { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid #cdbfb2; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: #f7f1eb; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.phone-row input { border-radius: 0 var(--radius) var(--radius) 0; }
.choice { border: 0; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.choice legend { float: left; padding: 0; margin-right: 8px; font-weight: 500; font-size: .9375rem; }
.choice label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; min-height: 32px; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-top: 18px; font-weight: 400; font-size: .9375rem; color: var(--ink-soft); }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange-deep); }
.otp-input { font: 600 1.75rem/1 var(--display) !important; letter-spacing: .32em; text-align: center; min-height: 64px !important; font-variant-numeric: tabular-nums; }
.otp-links { display: flex; justify-content: space-between; margin-top: 12px; }
.progress { height: 6px; background: #f1e6dc; border-radius: 3px; overflow: hidden; margin: 22px 0 18px; }
.progress span { display: block; height: 100%; width: 40%; background: var(--orange); border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .progress span { animation: slide 1.3s ease-in-out infinite; }
}
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ------------------------------------------------------------ wider screens */
@media (min-width: 640px) {
  .link-row { grid-template-columns: 1fr auto; }
  dialog { max-width: 460px; margin: auto; border-radius: 18px; }
  .panel { padding: 32px 32px 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { display: block; }
  .steps li::before { margin-bottom: 18px; }
  .steps p { margin-top: 8px; }
  .proof { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .next { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 880px) {
  .wrap { padding: 0 32px; }
  .brand img { width: 104px; }
  .top-row { min-height: 72px; }
  .top-nav { display: flex; }
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 72px; align-items: end; }
  .hero-art { display: block; width: 100%; max-width: 440px; margin-bottom: 36px; }
  .band { padding: 88px 0; }
  .method-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 72px; }
  .faq-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 72px; }
  .result-head { padding: 40px 0 56px; }
  .result-body { padding: 56px 0 72px; }
  .ready-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 88px; align-items: end; }
  .bridge { margin: 0 0 6px auto; width: 100%; max-width: 560px; }
  .stamp { margin-top: 28px; }

  .sections thead { display: table-header-group; }
  .sections tbody tr, .sections tfoot tr { display: table-row; }
  .sections th, .sections td, .sections td.pct, .sections td.col-pct:not(.pct), .sections td:not(.col-pct) {
    display: table-cell; padding: 16px 12px; text-align: right; border-top: 1px solid var(--line); margin: 0;
    font: 400 1rem/1.6 var(--text); letter-spacing: 0; color: var(--ink); }
  .sections td::before, .sections td.col-pct:not(.pct)::before, .sections td:not(.col-pct)::before { content: none; }
  .sections thead th { font: 500 .875rem/1.3 var(--text); color: var(--ink-soft); border-top: 0; padding-bottom: 10px; }
  .sections th:first-child { text-align: left; padding-left: 0; }
  .sections th[scope="row"] { font: 600 1.0625rem/1.3 var(--display); padding: 16px 12px 16px 0; }
  .sections td.pct { font-weight: 600; }
  .sections tfoot th, .sections tfoot td, .sections tfoot td.pct, .sections tfoot td:not(.col-pct), .sections tfoot td.col-pct:not(.pct) { border-top: 2px solid var(--ink); font-weight: 600; }
  /* Before percentiles open, both percentile columns go. This must outrank the table-cell rule above
     (.sections td.col-pct:not(.pct)), or the empty "Likely range" cell stays and every number shifts right. */
  .sections.no-pct .col-pct, .sections.no-pct td.col-pct:not(.pct), .sections.no-pct td.pct { display: none; }
}

/* Notice set by the owner's tools (plain text, optional link to Rodha, iimcat.ac.in or YouTube) */
.notice { background: var(--peach); color: var(--ink); border-bottom: 1px solid var(--line); }
.notice-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 12px; padding-bottom: 12px; font-size: .9375rem; }
.notice-row p { margin: 0; }
.notice-link { color: var(--orange-deep); font-weight: 600; text-underline-offset: 3px; }
.notice-warning { background: var(--danger); color: #fff; border-bottom-color: var(--danger); }
.notice-warning .notice-link { color: #fff; }
