:root {
  --ink: #1f2933;
  --muted: #667085;
  --line: #e3e0da;
  --paper: #fff;
  --soft: #f6f5f2;
  --brand: #e86100;
  --brand-dark: #1a2640;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fbfaf7;
  line-height: 1.55;
}
a { color: #c4510c; text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--brand-dark);
  font-weight: 900;
  letter-spacing: 0;
}
.brand img { width: 146px; height: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
main { padding: 32px 0 48px; }
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .75fr);
  gap: 28px;
  align-items: start;
  padding: 10px 0 28px;
}
h1 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 52px); line-height: 1.06; color: var(--brand-dark); letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 24px; line-height: 1.22; color: var(--brand-dark); letter-spacing: 0; }
p { margin: 0 0 14px; color: var(--muted); }
.note {
  border-left: 4px solid var(--brand);
  padding: 14px 16px;
  background: var(--soft);
  border-radius: 0 8px 8px 0;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.tool-card,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.tool-card h2 { font-size: 19px; margin-bottom: 8px; }
.tool-card p { min-height: 50px; }
.tool-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .75fr);
  gap: 20px;
  align-items: start;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
label { display: grid; gap: 6px; font-size: 13px; color: #344054; font-weight: 800; }
input,
select {
  width: 100%;
  border: 1px solid #cfd4dc;
  border-radius: 6px;
  min-height: 42px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus,
select:focus {
  outline: 2px solid rgba(232, 97, 0, .22);
  border-color: var(--brand);
}
button {
  min-height: 44px;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.metric { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--soft); min-height: 82px; }
.metric strong { display: block; color: var(--brand-dark); font-size: 21px; line-height: 1.15; margin-top: 5px; overflow-wrap: anywhere; }
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.advice { border-top: 1px solid var(--line); padding-top: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: #344054; font-size: 13px; background: #fff; }
footer { border-top: 1px solid var(--line); padding: 24px 0 34px; color: var(--muted); background: var(--paper); font-size: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media (max-width: 820px) {
  .intro,
  .tool-layout,
  .tool-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; padding: 18px 0; }
}
@media (max-width: 560px) {
  .fields,
  .result-grid { grid-template-columns: 1fr; }
  main { padding-top: 20px; }
}
