/* 事務計算 共通スタイル：文字は黒・帯を敷かない・日付はスラッシュ */
:root { --ink: #000; --line: #ccc; --muted: #555; --accent: #0b5cad; --warn: #b00020; --ok: #1a7f37; --bg: #fff; }
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px; }
a { color: var(--accent); }
header.site { border-bottom: 1px solid var(--line); }
header.site .in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
header.site .brand { font-weight: 800; font-size: 26px; letter-spacing: 0.04em; color: var(--ink); text-decoration: none; line-height: 1.2; }
header.site .brand .mark { font-size: 28px; margin-right: 6px; vertical-align: -2px; }
header.site .brand:hover { color: var(--accent); }
header.site .tag { color: var(--muted); font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 28px 0 8px; border-left: 4px solid var(--accent); padding-left: 8px; }
h3 { font-size: 15px; margin: 16px 0 6px; }
p.lead { color: var(--muted); margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 0 0 12px; }
legend { font-weight: 700; padding: 0 6px; }
label.row { display: grid; grid-template-columns: 11em 1fr; align-items: center; gap: 8px; margin: 6px 0; }
label.row > span.k { color: var(--ink); }
input[type=number], input[type=text], select, input[type=date] { font: inherit; padding: 5px 8px; border: 1px solid #888; border-radius: 4px; width: 100%; max-width: 16em; background: #fff; color: var(--ink); }
input[type=number] { text-align: right; }
.unit { color: var(--muted); font-size: 13px; margin-left: 4px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 4px 11em; }
@media (max-width: 860px) { label.row { grid-template-columns: 1fr; } .hint { margin-left: 0; } }
details > summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.current td { font-weight: 700; }
.result { border: 2px solid var(--ink); border-radius: 6px; padding: 12px 14px; }
.result .big { font-size: 26px; font-weight: 700; }
.result .sub { color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: 9em 1fr; gap: 4px 10px; margin: 8px 0; }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; }
.warn { border-left: 4px solid var(--warn); padding: 6px 10px; margin: 8px 0; }
.warn.error { color: var(--warn); font-weight: 700; }
.note { border-left: 4px solid var(--line); padding: 6px 10px; margin: 8px 0; color: var(--ink); font-size: 14px; }
.ok { color: var(--ok); font-weight: 700; }
.ng { color: var(--warn); font-weight: 700; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
button { font: inherit; padding: 7px 14px; border: 1px solid var(--ink); border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.allow { display: grid; grid-template-columns: 1.6fr 8em 6em auto; gap: 6px; align-items: center; margin: 4px 0; }
@media (max-width: 860px) { .allow { grid-template-columns: 1fr 7em 6em auto; } }
.allow input[type=number] { max-width: 8em; }
.allow .grp { grid-column: 1 / -1; font-weight: 700; margin-top: 8px; font-size: 13.5px; }
.law { font-size: 13px; color: var(--muted); }
.law a { color: var(--accent); }
footer.site { border-top: 1px solid var(--line); margin-top: 32px; }
footer.site .in { max-width: 1100px; margin: 0 auto; padding: 14px 16px; font-size: 13px; color: var(--muted); }
footer.site nav a { margin-right: 14px; }
.ad { margin: 16px 0; min-height: 0; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tools a.card { display: block; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.tools a.card:hover { border-color: var(--accent); }
.tools a.card .t { font-weight: 700; }
.tools a.card .d { color: var(--muted); font-size: 13px; }
.tools .soon { border: 1px dashed var(--line); border-radius: 6px; padding: 12px 14px; color: var(--muted); }
.faq dt { font-weight: 700; margin-top: 10px; }
.faq dd { margin: 2px 0 0 0; }
@media print {
  header.site, footer.site, .btns, .ad, details.expl, .noprint { display: none !important; }
  .grid { grid-template-columns: 1fr; }
  body { font-size: 12px; }
  .result { border-width: 1px; }
}

.allow label.ot { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 3px; }
