:root {
  --ink: #17202a;
  --muted: #5d6d7e;
  --line: #d9e2ec;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --brand: #0b3c5d;
  --brand-2: #1378a8;
  --accent: #f2b134;
  --good: #16794c;
  --bad: #b42318;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(23, 32, 42, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: ui-sans-system, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}
a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }
.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  color: #fff;
  background: linear-gradient(135deg, #092f49, var(--brand) 58%, #12618c);
  box-shadow: 0 3px 18px rgba(9, 47, 73, .25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.brand { color: #fff; text-decoration: none; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.site-nav a { color: #eaf4fa; text-decoration: none; padding: .42rem .62rem; border-radius: 999px; font-size: .94rem; }
.site-nav a:hover, .site-nav a:focus { background: rgba(255,255,255,.14); color: #fff; }
.hero { padding: 3.6rem 0 2.4rem; }
.hero h1, .page-title { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 1rem; }
.hero p { font-size: 1.16rem; color: var(--muted); max-width: 760px; }
main { padding-bottom: 3rem; }
.page-head { padding: 2.4rem 0 1rem; }
.page-head p { color: var(--muted); font-size: 1.08rem; max-width: 800px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card, .tool-panel, .content-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 1.25rem; }
.card h2, .card h3 { margin-top: 0; line-height: 1.25; }
.card p { color: var(--muted); }
.card a { font-weight: 700; }
.tool-panel { padding: 1.35rem; margin: 1rem 0 1.5rem; }
.content-card { padding: clamp(1.25rem, 3vw, 2.25rem); margin: 1.5rem 0; }
.content-card h2 { margin-top: 2rem; line-height: 1.25; }
.content-card h2:first-child { margin-top: 0; }
.content-card p, .content-card li { color: #334155; }
.tool-form, .form-grid { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.field { display: grid; gap: .35rem; flex: 1 1 220px; }
.field.inline { flex: 0 1 180px; }
label { font-weight: 700; font-size: .94rem; }
input, select, textarea {
  width: 100%; border: 1px solid #aebfd0; border-radius: 10px; padding: .72rem .8rem;
  font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 180px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(242,177,52,.55); outline-offset: 2px; }
button, .btn {
  border: 0; border-radius: 999px; padding: .72rem 1.05rem; font: inherit; font-weight: 800;
  color: #fff; background: var(--brand-2); cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--brand); color: #fff; }
button.secondary { background: #e8eef4; color: var(--brand); }
button.secondary:hover { background: #d7e4ee; }
button:disabled { opacity: .55; cursor: wait; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.result { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: #eef6fb; border: 1px solid #c9dfef; overflow-wrap: anywhere; }
.result:empty { display: none; }
.result.error { background: #fff1f0; border-color: #f1c6c1; color: var(--bad); }
.result.success { background: #ecfdf3; border-color: #bbe8cd; }
.big-value { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 850; line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 1rem; }
.stat { background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: .85rem; }
.stat b { display: block; font-size: 1.25rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; vertical-align: top; padding: .68rem .75rem; border-bottom: 1px solid var(--line); }
th { background: #eef3f7; }
td:first-child { font-weight: 700; width: 28%; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: #edf2f7; padding: .1rem .28rem; border-radius: 5px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #102a43; color: #eaf4fa; border-radius: 12px; padding: 1rem; overflow: auto; }
progress { width: 100%; height: 1rem; accent-color: var(--brand-2); }
input[type="range"] { padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: .8rem; }
.checks label { display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.checks input { width: auto; }
.faq h3 { margin-bottom: .25rem; }
.faq p { margin-top: .25rem; }
.tool-links { columns: 2; column-gap: 2rem; }
.tool-links li { break-inside: avoid; margin-bottom: .35rem; }
.notice { border-left: 4px solid var(--accent); background: #fff8e1; padding: .85rem 1rem; border-radius: 0 10px 10px 0; }
.site-footer { background: #102a43; color: #d7e6f0; padding: 2rem 0; margin-top: 2rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer a { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; }
@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .header-inner { align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .grid, .stats { grid-template-columns: 1fr; }
  .tool-links { columns: 1; }
  .hero { padding-top: 2.4rem; }
  td:first-child { width: auto; }
}
