:root {
  --ink: #020b14; --navy-950: #04111f; --navy-900: #071a2d; --navy-850: #0a2137;
  --cyan: #3ce2d5; --cyan-bright: #70fff2; --blue: #62a9ff; --red: #ff6370;
  --amber: #ffc15c; --white: #f6fbff; --text: #dceaf3; --muted: #90aabc;
  --line: rgba(161, 208, 231, .15); --panel: rgba(7, 27, 46, .84);
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text);
  font-family: "Times New Roman", Times, serif; font-size: 20px;
  background: radial-gradient(circle at 8% 4%, rgba(60,226,213,.14), transparent 25rem), radial-gradient(circle at 91% 18%, rgba(98,169,255,.09), transparent 30rem), linear-gradient(145deg, #030d18, #06192a 48%, #030b14);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(60,226,213,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(60,226,213,.07) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: linear-gradient(to bottom, black 0, transparent 78%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-header {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  align-items: center; gap: 2rem; max-width: 1340px; margin: 0 auto; padding: 1.55rem 2rem 1.3rem;
}
.brand-cluster { display: flex; align-items: flex-start; gap: 1rem; }
.brand-mark {
  display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px;
  border: 1px solid rgba(60,226,213,.48); border-radius: 17px; color: var(--cyan);
  background: linear-gradient(145deg, rgba(60,226,213,.17), rgba(60,226,213,.025));
  box-shadow: inset 0 0 26px rgba(60,226,213,.08), 0 12px 36px rgba(0,0,0,.22);
}
.brand-mark svg { width: 39px; height: 39px; filter: drop-shadow(0 0 8px rgba(60,226,213,.42)); }
.brand-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .35rem; }
.eyebrow, .step-label { margin: 0; color: var(--cyan); font-size: .72rem; font-weight: 850; letter-spacing: .15em; }
.status-pill { display: inline-flex; align-items: center; gap: .4rem; color: #b6cbc9; font-size: .68rem; font-weight: 700; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: statusPulse 2s ease-in-out infinite; }
@keyframes statusPulse { 50% { opacity: .45; box-shadow: 0 0 3px var(--cyan); } }
h1 { margin: 0; color: var(--white); font-size: clamp(1.45rem, 2.7vw, 2.25rem); line-height: 1.12; letter-spacing: -.035em; }
.app-header h1 span { color: var(--white); }
.app-header h1 em { color: var(--cyan); font-style: normal; text-shadow: 0 0 24px rgba(60,226,213,.25); }
.brand-expansion { max-width: 720px; margin: .45rem 0 0; color: #b9cfdb; font-weight: 700; line-height: 1.45; }
.header-copy { max-width: 670px; margin: .55rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.brand-tagline { display: inline-block; margin: .45rem 0 0; border-left: 3px solid var(--cyan); padding-left: .65rem; color: var(--cyan-bright); font-style: italic; line-height: 1.35; }

.heart-monitor {
  position: relative; min-height: 230px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(60,226,213,.28); border-radius: 22px; padding: .8rem 1rem;
  color: rgba(60,226,213,.12); background: radial-gradient(circle at 72% 48%, rgba(57,154,255,.21), transparent 42%), linear-gradient(150deg, rgba(9,39,59,.86), rgba(2,12,22,.95));
  box-shadow: inset 0 0 40px rgba(60,226,213,.045), 0 18px 50px rgba(0,0,0,.26);
}
.heart-monitor::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,15,26,.65), transparent 48%, rgba(3,15,26,.08)); }
.heart-monitor img { position: absolute; z-index: -1; right: .8rem; bottom: -30%; width: 48%; height: 145%; object-fit: contain; mix-blend-mode: screen; filter: saturate(1.08) contrast(1.04) drop-shadow(0 0 24px rgba(61,168,255,.22)); animation: heartBeat 1.45s ease-in-out infinite; }
.monitor-meta { display: flex; justify-content: space-between; color: #7799aa; font-size: .61rem; font-weight: 800; letter-spacing: .12em; }
.monitor-meta b { color: var(--cyan); }
.heart-trace { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; display: block; width: 100%; height: 96px; color: rgba(60,226,213,.12); transform: translateY(-38%); }
.heart-scan { position: absolute; z-index: 3; top: 2.6rem; bottom: 1rem; width: 70px; background: linear-gradient(90deg, transparent, rgba(60,226,213,.1)); animation: scanHeart 4s linear infinite; }
.trace { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(60,226,213,.5)); stroke-dasharray: 680; animation: drawTrace 4s linear infinite; }
.trace-glow { stroke-width: 8; opacity: .1; }
@keyframes drawTrace { from { stroke-dashoffset: 680; } to { stroke-dashoffset: 0; } }
@keyframes scanHeart { from { left: -80px; } to { left: calc(100% + 10px); } }
@keyframes heartBeat { 0%, 42%, 100% { transform: scale(1); } 48% { transform: scale(1.035); } 56% { transform: scale(1); } 64% { transform: scale(1.018); } }

.workspace {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.47fr) minmax(350px, .82fr);
  gap: 1.15rem; max-width: 1340px; margin: 0 auto; padding: 0 2rem 2rem;
}
.assessment, .result-panel {
  border: 1px solid var(--line); border-radius: 23px;
  background: linear-gradient(145deg, rgba(10,34,55,.9), rgba(5,22,38,.88));
  box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.assessment { min-height: 648px; padding: 1.45rem; }
.result-panel { position: sticky; top: 1rem; min-height: 648px; align-self: start; padding: 1.45rem; overflow: hidden; }
.result-panel::before { content: ""; position: absolute; right: -95px; top: -100px; width: 250px; height: 250px; border-radius: 50%; background: rgba(60,226,213,.09); filter: blur(12px); }

.section-heading, .progress-meta, .result-title-row, .form-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
h2 { margin: 0; color: var(--white); font-size: 1.42rem; letter-spacing: -.025em; }
.section-heading h2 { margin-top: .24rem; }
.ghost-button { border: 1px solid var(--line); border-radius: 10px; padding: .58rem .82rem; color: var(--cyan-bright); background: rgba(255,255,255,.025); font-weight: 700; }
.ghost-button:hover { border-color: rgba(60,226,213,.42); background: rgba(60,226,213,.07); }
.progress-wrap { margin: 1rem 0 .8rem; }
.progress-meta { margin-bottom: .45rem; color: var(--muted); font-size: .75rem; font-weight: 700; }
.progress-track { height: 4px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.075); }
.progress-track span { display: block; width: 14%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue)); box-shadow: 0 0 12px rgba(60,226,213,.35); transition: width .28s ease; }

.step-rail { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .38rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.step-rail li { position: relative; min-width: 0; border: 1px solid transparent; border-radius: 10px; padding: .48rem .38rem; color: #6f899b; background: rgba(255,255,255,.018); text-align: center; transition: all .22s ease; }
.step-rail li::after { content: ""; position: absolute; top: 18px; left: calc(100% + 2px); width: calc(100% - 4px); height: 1px; background: var(--line); transform: translateX(-50%); z-index: -1; }
.step-rail li:last-child::after { display: none; }
.step-rail b { display: block; color: inherit; font-size: .7rem; letter-spacing: .02em; }
.step-rail span { display: block; overflow: hidden; margin-top: .18rem; font-size: .58rem; white-space: nowrap; text-overflow: ellipsis; }
.step-rail li.active { border-color: rgba(60,226,213,.42); color: var(--cyan-bright); background: rgba(60,226,213,.105); box-shadow: 0 0 18px rgba(60,226,213,.07); }
.step-rail li.completed { color: #a2bbc8; background: rgba(98,169,255,.065); }
.step-rail li.completed::before { content: "✓"; position: absolute; top: -6px; right: -3px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; color: var(--ink); background: var(--cyan); font-size: .55rem; font-weight: 900; }

fieldset { border: 0; padding: 0; margin: 0; }
.question-card { display: none; animation: fadeSlide .3s ease; }
.question-card.active { display: block; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
legend { width: 100%; padding: 0; color: var(--white); font-size: 1.13rem; font-weight: 780; }
legend span { display: inline-grid; place-items: center; width: 29px; height: 29px; margin-right: .5rem; border-radius: 9px; color: var(--ink); background: linear-gradient(135deg, var(--cyan), #7ceaf8); box-shadow: 0 0 18px rgba(60,226,213,.2); font-size: .88rem; }
.question-help { margin: .55rem 0 .95rem 2.6rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .64rem; }
.option-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option { position: relative; display: flex; min-height: 78px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(135deg, rgba(255,255,255,.033), rgba(255,255,255,.012)); transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.option::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--cyan), var(--blue)); opacity: 0; transition: opacity .18s ease; }
.option:hover { border-color: rgba(60,226,213,.38); transform: translateY(-1px); background: rgba(60,226,213,.045); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option > span { display: flex; width: 100%; padding: .8rem .9rem; flex-direction: column; justify-content: center; border-radius: inherit; }
.option b { color: var(--text); font-size: .88rem; line-height: 1.35; }
.option small { margin-top: .27rem; color: var(--muted); font-size: .73rem; line-height: 1.38; }
.option:has(input:checked) { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(60,226,213,.18), inset 0 0 26px rgba(60,226,213,.055); }
.option:has(input:checked)::before { opacity: 1; }
.option input:checked + span { background: rgba(60,226,213,.075); }
.option input:focus-visible + span { box-shadow: inset 0 0 0 3px rgba(60,226,213,.32); }

.rate-entry { max-width: 410px; margin: 1.55rem auto; border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; background: rgba(1,11,20,.26); text-align: center; }
.rate-label { display: block; margin-bottom: .7rem; color: var(--cyan); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rate-number { display: flex; align-items: center; gap: .7rem; }
.rate-entry input { width: 100%; border: 1px solid rgba(60,226,213,.34); border-radius: 14px; padding: .8rem; color: var(--white); background: rgba(2,12,22,.76); font-size: 2.15rem; font-weight: 780; text-align: center; outline: none; }
.rate-entry input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(60,226,213,.09); }
.rate-entry span { color: var(--muted); white-space: nowrap; }
.rate-entry.rate-is-unavailable .rate-number { opacity: .42; }
.rate-unavailable { display: flex; align-items: center; justify-content: center; gap: .55rem; margin-top: 1rem; border: 1px solid var(--line); border-radius: 11px; padding: .72rem; color: var(--text); background: rgba(255,255,255,.025); cursor: pointer; }
.rate-unavailable input { width: 1.05rem; height: 1.05rem; accent-color: var(--cyan); }
.rate-unavailable span { color: var(--text); font-size: .84rem; font-weight: 750; white-space: normal; }
.rate-unavailable:has(input:checked) { border-color: var(--cyan); background: rgba(60,226,213,.075); }
.pattern-entry { margin-top: .85rem; border: 1px solid rgba(60,226,213,.2); border-radius: 13px; padding: .8rem; background: rgba(60,226,213,.05); }
.pattern-entry label { display: block; margin-bottom: .45rem; color: var(--cyan-bright); font-size: .8rem; font-weight: 750; }
.pattern-entry select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; color: var(--text); background: var(--navy-900); outline: none; }
.pattern-entry select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(60,226,213,.09); }

.form-actions { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.primary-button, .secondary-button, .print-button { min-height: 44px; border-radius: 11px; padding: .72rem 1rem; font-weight: 780; transition: all .18s ease; }
.primary-button { display: inline-flex; align-items: center; gap: .6rem; margin-left: auto; border: 1px solid var(--cyan); color: #03171c; background: linear-gradient(135deg, var(--cyan), #7fe9f4); box-shadow: 0 10px 28px rgba(60,226,213,.13); }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.secondary-button { border: 1px solid var(--line); color: var(--text); background: transparent; }
.secondary-button:hover:not(:disabled) { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.035); }
.secondary-button:disabled { opacity: .32; cursor: not-allowed; }
.result-button { display: none; }
.validation-message { min-height: 1.1rem; margin: .7rem 0 0; color: var(--amber); font-size: .8rem; }

.result-placeholder { position: relative; z-index: 1; display: flex; min-height: 600px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.result-monitor { position: relative; width: 100%; max-width: 410px; margin-bottom: 1.2rem; overflow: hidden; border: 1px solid rgba(60,226,213,.2); border-radius: 15px; padding: .7rem .75rem .45rem; color: var(--cyan); background: rgba(1,12,21,.55); box-shadow: inset 0 0 30px rgba(60,226,213,.025); }
.result-monitor-top { display: flex; justify-content: space-between; color: #6f8e9f; font-size: .58rem; font-weight: 850; letter-spacing: .12em; }
.result-monitor-top i { color: var(--cyan); font-style: normal; }
.result-monitor svg { display: block; width: 100%; height: 102px; margin-top: .35rem; }
.result-grid { fill: none; stroke: rgba(60,226,213,.1); stroke-width: .7; vector-effect: non-scaling-stroke; }
.result-trace { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(60,226,213,.52)); stroke-dasharray: 650; animation: drawTrace 3.5s linear infinite; }
.scan-line { position: absolute; top: 25px; bottom: 7px; width: 45px; background: linear-gradient(90deg, transparent, rgba(60,226,213,.08)); animation: scan 3.5s linear infinite; }
@keyframes scan { from { left: -50px; } to { left: calc(100% + 10px); } }
.result-placeholder > p:not(.step-label) { max-width: 365px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.result-placeholder h2 { margin-top: .28rem; }
.mini-guide { display: grid; width: 100%; margin-top: 1.1rem; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.mini-guide span { display: flex; border: 1px solid var(--line); border-radius: 10px; padding: .62rem; align-items: center; gap: .6rem; color: var(--muted); font-size: .74rem; text-align: left; background: rgba(255,255,255,.018); }
.mini-guide b { display: grid; place-items: center; min-width: 34px; height: 29px; color: var(--cyan); border-radius: 8px; background: rgba(60,226,213,.08); font-size: .72rem; }

.result-content { position: relative; z-index: 1; }
.result-title-row { align-items: flex-start; margin-top: .25rem; }
.urgency-badge { border: 1px solid rgba(60,226,213,.35); border-radius: 999px; padding: .34rem .58rem; color: var(--cyan-bright); background: rgba(60,226,213,.09); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.urgency-badge.warning { color: #ffd38c; border-color: rgba(255,193,92,.45); background: rgba(255,193,92,.09); }
.urgency-badge.urgent { color: #ffb2b8; border-color: rgba(255,99,112,.5); background: rgba(255,99,112,.1); }
.result-summary { margin: .8rem 0 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .87rem; line-height: 1.55; }
.result-section { margin-top: 1rem; }
.result-section h3 { margin: 0 0 .48rem; color: var(--white); font-size: .88rem; }
.result-section p, .result-section li { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.result-section ul { margin: 0; padding-left: 1.05rem; }
.result-section li + li { margin-top: .22rem; }
.action-section { border: 1px solid rgba(60,226,213,.2); border-radius: 12px; padding: .82rem; background: rgba(60,226,213,.05); }
.action-section p { margin: 0; }
.arrest-section { border: 1px solid rgba(255,99,112,.44); border-radius: 15px; padding: .9rem; background: rgba(255,99,112,.075); }
.arrest-section h3 { color: #ffc4c8; }
.arrest-section .arrest-note { margin: 0 0 .7rem; color: #ffd9dc; font-weight: 760; }
.arrest-section ol { margin: 0; padding-left: 1.2rem; }
.arrest-section li::marker { color: #ff9aa3; font-weight: 850; }
.guideline-link { display: inline-flex; margin-top: .85rem; border-bottom: 1px solid currentColor; color: var(--cyan-bright); font-size: 1.25rem; font-weight: 780; text-decoration: none; }
.guideline-link:hover { color: var(--white); }
.print-button { width: 100%; margin-top: .9rem; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.035); }
.print-button:hover { border-color: rgba(60,226,213,.35); background: rgba(60,226,213,.06); }

footer { max-width: 1340px; margin: 0 auto; padding: 0 2rem 2rem; }
footer p { margin: 0; border: 1px solid rgba(255,193,92,.16); border-left: 3px solid var(--amber); border-radius: 0 12px 12px 0; padding: .72rem 1rem; color: var(--muted); background: rgba(255,193,92,.035); font-size: .76rem; line-height: 1.55; }
footer b { color: #ffd692; }

/* Ukuran teks minimum 20px untuk keterbacaan */
.eyebrow, .step-label, .status-pill, .monitor-meta,
.progress-meta, .step-rail b, .step-rail span,
.question-card legend > span, .option b, .option small, .rate-entry > label, .rate-entry span,
.pattern-entry label, .pattern-entry select, .primary-button, .secondary-button,
.print-button, .validation-message, .result-monitor-top,
.result-placeholder > p:not(.step-label), .mini-guide span, .mini-guide b,
.urgency-badge, .result-summary, .result-section h3,
.result-section p, .result-section li, footer p { font-size: 1.25rem; }
.brand-expansion, .brand-tagline, .header-copy, .question-help { font-size: 1.25rem; }
h1 { font-size: clamp(2rem, 3.5vw, 3.1rem); }
h2 { font-size: 1.75rem; }
legend { font-size: 1.5rem; }

@media (max-width: 1020px) {
  .app-header { grid-template-columns: 1fr; gap: 1rem; }
  .heart-monitor { min-height: 220px; }
  .workspace { grid-template-columns: 1fr; }
  .result-panel { position: static; min-height: auto; }
  .result-placeholder { min-height: 440px; }
}
@media (max-width: 700px) {
  .app-header { padding: 1.2rem 1rem 1rem; }
  .brand-mark { flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; }
  .brand-mark svg { width: 32px; height: 32px; }
  .brand-meta { flex-wrap: wrap; gap: .35rem .65rem; }
  .header-copy { font-size: 1.25rem; }
  .heart-monitor { min-height: 190px; }
  .heart-monitor img { width: 54%; right: -.2rem; }
  .workspace { padding: 0 1rem 1rem; }
  .assessment, .result-panel { padding: 1.05rem; border-radius: 18px; }
  .step-rail { display: flex; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
  .step-rail li { flex: 0 0 68px; }
  .step-rail li::after { display: none; }
  .option-grid, .option-grid.compact { grid-template-columns: 1fr; }
  .option { min-height: 72px; }
  .question-help { margin-left: 0; }
  .section-heading { align-items: flex-start; }
  .result-placeholder { min-height: 400px; }
  footer { padding: 0 1rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body { color: #111; background: white; }
  body::before, .assessment, .result-placeholder, .print-button, .heart-monitor { display: none !important; }
  .app-header, .workspace, footer { max-width: none; padding: 1rem; }
  .brand-mark { color: #087a75; border-color: #999; }
  h1, h2, .result-section h3 { color: #111; }
  .header-copy, .result-summary, .result-section p, .result-section li, footer p { color: #333; }
  .workspace { display: block; }
  .result-panel { min-height: 0; border: 1px solid #bbb; box-shadow: none; background: white; }
}
