:root {
  --slate: #616c80;
  --slate-dark: #4a5568;
  --ink: #2d3748;
  --body: #4a5568;
  --muted: #718096;
  --green: #48bb78;
  --amber: #d69e2e;
  --red: #c53030;
  --line: #e2e8f0;
  --wash: #f8f9fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.topbar {
  background: var(--slate);
  padding: 16px 0;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar img { height: 32px; width: auto; }
.topbar a.home { display: inline-flex; align-items: center; }
.topbar .signin {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid rgba(255,255,255,.8);
  padding: 7px 16px;
  border-radius: 8px;
  transition: background .3s ease;
}
.topbar .signin:hover { background: rgba(255,255,255,.12); }

.guide-hero {
  background: var(--slate);
  color: #fff;
  padding: 40px 20px 32px;
}
.guide-hero .crumb {
  color: #fff;
  font-size: .82rem;
  opacity: .82;
  margin-bottom: 12px;
}
.guide-hero .crumb a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.guide-hero h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 12px;
}
.guide-hero p.standfirst {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.45;
  opacity: .93;
  max-width: 62ch;
  margin-bottom: 0;
}

main.container { padding: 64px 20px 24px; }

h2 {
  font-size: 1.55rem;
  color: var(--ink);
  margin: 44px 0 14px;
  line-height: 1.3;
}
h2:first-child { margin-top: 0; }
h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 26px 0 8px;
}
p { margin-bottom: 16px; color: var(--body); }
ul, ol { margin: 0 0 18px 22px; color: var(--body); }
li { margin-bottom: 8px; }
strong { color: var(--ink); }
a { color: var(--slate-dark); }

.calc {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  margin: 28px 0;
}
.calc h2, .calc h3 { margin-top: 0; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}
.field .hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: .76rem;
  margin-top: 2px;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .prefix {
  position: absolute;
  left: 11px;
  color: var(--muted);
  font-size: .95rem;
  pointer-events: none;
}
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.field input.has-prefix { padding-left: 26px; }
.field input:focus {
  outline: none;
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(97,108,128,.15);
}

.result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
.result .headline {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 4px;
}
.result .headline.good { color: var(--green); }
.result .headline.bad { color: var(--red); }
.result .headline-label {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.result .summary { color: var(--body); margin: 14px 0 0; font-size: .97rem; }
.breakdown {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: .94rem;
  color: var(--body);
  margin: 0;
}
.breakdown li span:last-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.err { color: var(--red); font-size: .92rem; margin-top: 10px; }

.note {
  border-left: 3px solid var(--slate);
  background: var(--wash);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.note p { margin: 0; font-size: .95rem; }
.note p + p { margin-top: 10px; }
.note.warn { border-left-color: var(--amber); }

.faq { margin-top: 10px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 400;
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; font-size: .96rem; }

.cta {
  background: linear-gradient(135deg, #616c80 0%, #4a5568 100%);
  color: #fff;
  border-radius: 12px;
  padding: 34px 28px;
  text-align: center;
  margin: 48px 0 8px;
}
.cta h2 { color: #fff; margin: 0 0 12px; font-size: 1.5rem; }
.cta p { color: rgba(255,255,255,.92); margin-bottom: 22px; }
.cta .badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cta .badges img { height: 46px; width: auto; }
.cta .badges a { transition: transform .3s ease; display: inline-block; }
.cta .badges a:hover { transform: translateY(-3px); }

.related {
  margin: 40px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.related h2 { font-size: 1.2rem; margin: 0 0 14px; }
.related ul { list-style: none; margin: 0; }
.related li { margin-bottom: 9px; }
.related a { color: var(--slate-dark); text-decoration: none; font-weight: 600; }
.related a:hover { text-decoration: underline; }
.related .desc { color: var(--muted); font-weight: 400; font-size: .92rem; display: block; }

.footer {
  background: var(--ink);
  color: #fff;
  padding: 36px 20px;
  text-align: center;
  margin-top: 56px;
}
.footer-links { margin-bottom: 16px; }
.footer-links a {
  color: #cbd5e0;
  text-decoration: none;
  margin: 0 13px;
  font-size: .95rem;
  line-height: 2;
}
.footer-links a:hover { color: #fff; }
.copyright { color: var(--muted); font-size: .86rem; }

.disclaimer {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .guide-hero h1 { font-size: 1.7rem; }
  .guide-hero { padding: 36px 20px 28px; }
  main.container { padding: 44px 20px 24px; }
  .result .headline { font-size: 1.6rem; }
  .calc { padding: 20px 18px; }
}
