@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #f5f5f2;
  --ink: #171817;
  --muted: #777a74;
  --line: #d8d9d3;
  --card: #ffffff;
  --acid: #d6ff4b;
  --acid-deep: #9abd17;
  --blue: #2962ff;
  --orange: #f26b3a;
  --red: #e34f45;
  --green: #287a55;
  --shadow: 0 18px 60px rgba(27, 31, 25, .07);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: Manrope, system-ui, sans-serif; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(41, 98, 255, .36); outline-offset: 3px; }

.app-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 88px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: -.05em; }
.brand-mark { width: 28px; height: 28px; background: var(--ink); display: grid; place-items: center; transform: rotate(45deg); border-radius: 7px; }
.brand-mark span { width: 10px; height: 10px; display: block; background: var(--acid); border-radius: 50%; }
.privacy-note { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); letter-spacing: .02em; display: flex; gap: 8px; align-items: center; text-transform: uppercase; }
.privacy-dot { width: 7px; height: 7px; background: var(--acid-deep); border-radius: 50%; box-shadow: 0 0 0 4px rgba(154, 189, 23, .14); }

.main-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(440px, 1.1fr); gap: 62px; padding: 82px 0 76px; align-items: start; }
.intro-panel { padding-top: 24px; }
.eyebrow, .card-kicker, .result-label, .section-label { color: var(--muted); font-family: 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; margin: 0; }
.eyebrow span { color: var(--blue); font-size: 15px; margin-left: 5px; }
h1 { font-size: clamp(52px, 6.1vw, 92px); line-height: .93; letter-spacing: -.075em; margin: 24px 0 28px; font-weight: 800; }
h1 em { color: var(--blue); font-style: normal; }
.intro-copy { max-width: 370px; color: #565954; font-size: 15px; line-height: 1.75; margin: 0; }
.trust-row { margin-top: 64px; display: flex; align-items: center; gap: 14px; max-width: 420px; }
.trust-item { display: grid; gap: 8px; min-width: 72px; }
.trust-item strong { font: 500 12px 'DM Mono', monospace; color: var(--blue); }
.trust-item span { font-size: 10px; line-height: 1.35; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.trust-line { height: 1px; background: var(--line); flex: 1; }

.check-card, .result-card { background: var(--card); border: 1px solid #e5e6e1; border-radius: 4px; box-shadow: var(--shadow); }
.check-card { padding: 32px; }
.card-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 27px; }
.card-head h2 { margin: 9px 0 0; font-size: 24px; letter-spacing: -.045em; }
.card-count { font: 11px 'DM Mono', monospace; color: var(--muted); border: 1px solid var(--line); padding: 7px 9px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f0f1ed; border-radius: 5px; margin-bottom: 20px; }
.mode-button { border: 0; background: transparent; color: var(--muted); padding: 12px; border-radius: 3px; font-size: 13px; font-weight: 700; transition: .2s ease; }
.mode-button.is-active { color: var(--ink); background: var(--acid); box-shadow: 0 2px 0 rgba(23, 24, 23, .08); }
.input-wrap { border: 1px solid var(--line); border-radius: 4px; padding: 16px 16px 11px; transition: .2s ease; }
.input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 98, 255, .08); }
.input-wrap label { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 11px; }
textarea { width: 100%; resize: vertical; border: 0; padding: 0; color: var(--ink); min-height: 154px; line-height: 1.6; font-size: 14px; background: transparent; }
textarea::placeholder { color: #aaaDA5; }
textarea:focus { outline: none; }
.input-meta { display: flex; justify-content: space-between; color: #a0a39d; font: 10px 'DM Mono', monospace; padding-top: 6px; }
.local-badge { color: var(--green); }
.local-badge span { font-size: 12px; vertical-align: -1px; }
.action-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; }
.demo-button, .clear-button { border: 0; background: transparent; color: var(--muted); padding: 8px 0; font-size: 12px; }
.demo-button { color: var(--blue); font-weight: 700; }
.spark { font-size: 16px; vertical-align: -1px; margin-right: 4px; }
.primary-actions { display: flex; align-items: center; gap: 18px; }
.clear-button:hover, .demo-button:hover { color: var(--ink); }
.check-button { border: 0; background: var(--ink); color: white; padding: 13px 17px 13px 19px; border-radius: 3px; font-size: 12px; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.check-button span { color: var(--acid); font-size: 17px; margin-left: 12px; vertical-align: -1px; }
.check-button:hover { background: var(--blue); transform: translateY(-1px); }
.helper-text { margin-top: 24px; padding-top: 18px; border-top: 1px solid #edeee9; color: #949790; font: 10px 'DM Mono', monospace; }
.lock-icon { color: var(--green); font-size: 15px; margin-right: 5px; }

.result-card { grid-column: 2; padding: 29px 32px 25px; margin-top: -32px; animation: slide-in .34s ease both; }
.result-card.is-hidden { display: none; }
@keyframes slide-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.result-topline { display: flex; justify-content: space-between; align-items: center; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.result-time { color: #a0a39d; font: 10px 'DM Mono', monospace; }
.risk-overview { display: flex; gap: 22px; align-items: center; padding: 25px 0 20px; }
.risk-score { font: 800 48px Manrope, sans-serif; letter-spacing: -.07em; line-height: 1; min-width: 118px; }
.risk-score small { color: #a0a39d; font: 11px 'DM Mono', monospace; letter-spacing: 0; }
.risk-status { display: inline-block; font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--green); margin-bottom: 8px; }
.risk-copy h2 { margin: 0 0 7px; font-size: 19px; line-height: 1.2; letter-spacing: -.04em; }
.risk-copy p { color: var(--muted); margin: 0; font-size: 12px; line-height: 1.55; }
.risk-meter { height: 6px; background: #eef0ea; overflow: hidden; border-radius: 8px; }
.risk-meter span { display: block; height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .7s ease; }
.result-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 25px; }
.section-label { margin-bottom: 13px; }
.flags-list { display: grid; gap: 8px; }
.flag { display: flex; gap: 9px; align-items: start; font-size: 11px; line-height: 1.4; color: #555952; }
.flag-dot { flex: 0 0 auto; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; margin-top: 5px; }
.flag.is-safe .flag-dot { background: var(--green); }
.step-box { border-left: 3px solid var(--acid-deep); background: #f5f7e9; padding: 13px 13px 13px 14px; display: flex; gap: 10px; align-items: start; min-height: 76px; }
.step-icon { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: var(--acid); border-radius: 50%; font-size: 12px; font-weight: 800; }
.step-box p { font-size: 11px; line-height: 1.5; margin: 1px 0 0; color: #555952; }
.result-footnote { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid #edeee9; color: #a0a39d; font: 10px 'DM Mono', monospace; line-height: 1.45; }
.footer { border-top: 1px solid var(--line); margin-top: auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; color: #969992; font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .04em; }

body.risk-medium .risk-status { color: var(--orange); } body.risk-medium .risk-meter span { background: var(--orange); } body.risk-medium .step-box { border-color: var(--orange); background: #fff4ed; } body.risk-medium .step-icon { background: #ffcaab; }
body.risk-high .risk-status { color: var(--red); } body.risk-high .risk-meter span { background: var(--red); } body.risk-high .step-box { border-color: var(--red); background: #fff0ed; } body.risk-high .step-icon { background: #ffb9b1; }

@media (max-width: 850px) {
  .app-shell { width: min(100% - 32px, 620px); }
  .topbar { height: 70px; }
  .main-layout { display: flex; flex-direction: column; gap: 36px; padding: 54px 0 60px; }
  .intro-panel { padding-top: 0; }
  h1 { font-size: clamp(52px, 14vw, 78px); }
  .intro-copy { max-width: 500px; }
  .trust-row { margin-top: 36px; }
  .check-card, .result-card { width: 100%; }
  .result-card { margin-top: -15px; }
  .footer { gap: 18px; flex-direction: column; justify-content: center; align-items: start; padding: 16px 0; }
}
@media (max-width: 480px) {
  .app-shell { width: calc(100% - 24px); }
  .privacy-note { font-size: 9px; }
  .check-card, .result-card { padding: 22px 18px; }
  .card-head h2 { font-size: 21px; }
  .card-count { font-size: 9px; }
  .action-row { align-items: flex-start; flex-direction: column; }
  .primary-actions { width: 100%; justify-content: flex-end; }
  .result-columns { grid-template-columns: 1fr; gap: 20px; }
  .risk-overview { gap: 15px; }
  .risk-score { min-width: 91px; font-size: 39px; }
  .risk-copy h2 { font-size: 17px; }
}
