* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, sans-serif; color: #1f2933; background: #f6f4f1; }
a { color: #9a2f2c; }
header.site { background: #fff; border-bottom: 1px solid #e2ddd6; }
header.site .in, main, footer.site .in { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.site .in { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
header.site .brand { font-weight: 700; color: #1f2933; text-decoration: none; }
header.site nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
h1 { font-size: 28px; line-height: 1.25; margin: 24px 0 8px; }
h2 { font-size: 21px; margin: 32px 0 8px; }
h3 { font-size: 17px; margin: 20px 0 4px; }
.lead { margin: 0 0 20px; max-width: 760px; }

.tool { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.panel, .result { background: #fff; border: 1px solid #e2ddd6; border-radius: 10px; padding: 16px; }
.panel label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
.panel > div:first-child label { margin-top: 0; }
.panel input, .panel select { width: 100%; padding: 8px; font: inherit; border: 1px solid #c2bab0; border-radius: 6px; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.result h2 { margin-top: 0; }
.big { margin: 0 0 12px; padding: 12px; background: #fbf1ef; border: 1px solid #e8c9c6; border-radius: 8px; }
.big span { display: block; font-size: 14px; color: #52606d; }
.big b { font-size: 22px; line-height: 1.35; }
.warn { background: #fff6e0; border: 1px solid #f0c060; border-radius: 6px; padding: 8px; }
.note { font-size: 13px; color: #52606d; margin: 8px 0 0; }
table { border-collapse: collapse; }
td, th { border: 1px solid #e2ddd6; padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: #f6f4f1; }
table.steps { width: 100%; }
table.steps td:last-child { text-align: right; white-space: nowrap; }
.scroll { overflow-x: auto; background: #fff; border-radius: 10px; }
table.chart { width: 100%; font-size: 14px; }
table.chart caption { caption-side: top; text-align: left; padding: 8px 10px; font-size: 14px; color: #52606d; }
table.chart td, table.chart th { text-align: center; }
small { color: #52606d; }

.content { max-width: 760px; }
.content li { margin: 4px 0; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.links a { display: block; padding: 12px; background: #fff; border: 1px solid #e2ddd6; border-radius: 8px; text-decoration: none; }
footer.site { margin-top: 40px; background: #fff; border-top: 1px solid #e2ddd6; font-size: 13px; color: #52606d; }
footer.site .in { padding-top: 16px; padding-bottom: 24px; }

@media (max-width: 820px) { .tool { grid-template-columns: 1fr; } table.steps td:last-child { white-space: normal; } }
