/* Design tokens for the content and tool pages. Change colors, radii and spacing here. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --band: #f8f9fb;
  --line: #e4e7ec;
  --text: #1d2433;
  --muted: #5f6b7d;
  --action: #2563eb;
  --action-2: #3b82f6;
  --action-text: #ffffff;
  --brand: #e0527e;
  --radius: 12px;
  --radius-small: 8px;
  --gutter: 16px;
  --width: 760px;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow-wrap: break-word; }
a { color: var(--action); }
img { max-width: 100%; height: auto; }

.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head nav { max-width: var(--width); margin: 0 auto; padding: 10px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto; min-height: 44px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-head a:not(.brand) { color: var(--muted); font-size: 15px; text-decoration: none; padding: 10px 0; }

main { max-width: var(--width); margin: 16px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
main > section { padding: 24px var(--gutter); }
@media (min-width: 640px) { main > section { padding: 28px 32px; } }
main > section:nth-of-type(even) { background: var(--band); }
h1 { font-size: 32px; line-height: 1.2; margin-bottom: 12px; }
h2 { font-size: 23px; line-height: 1.3; margin-bottom: 10px; }
h3 { font-size: 18px; line-height: 1.35; margin: 18px 0 4px; }
p, ul, ol { margin-bottom: 12px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 5px; }
.lead { font-size: 18px; }
.note { font-size: 14px; color: var(--muted); }

.tool { background: var(--band); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0 4px; }
.tool label { display: block; font-weight: 600; margin-bottom: 6px; }
.tool input[type="date"] { width: 100%; max-width: 280px; min-height: 44px; padding: 8px 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); }
.total { font-size: 34px; font-weight: 700; line-height: 1.2; margin-top: 16px; }
.result { margin-top: 8px; }
.result[hidden] { display: none; }
.embed-code { width: 100%; min-height: 72px; padding: 8px; font: 13px/1.4 ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-radius: var(--radius-small); }

table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 15px; }
th { text-align: left; color: var(--muted); font-weight: 600; }
th, td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 559px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stack td { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; border: 0; text-align: right; }
  table.stack td:first-child { font-weight: 700; text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--muted); text-align: left; flex: 0 0 42%; }
  table.stack td:first-child::before { display: none; }
}

.cta h2 { margin-bottom: 6px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: var(--radius-small); background: linear-gradient(180deg, var(--action-2), var(--action)); color: var(--action-text); font-weight: 600; text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--action); border: 1px solid var(--line); }

details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { font-weight: 600; cursor: pointer; min-height: 28px; }
details p { margin: 8px 0 4px; }

.site-foot { max-width: var(--width); margin: 0 auto 28px; padding: 8px var(--gutter); font-size: 14px; color: var(--muted); }
.site-foot a { color: var(--muted); margin-right: 14px; display: inline-block; padding: 6px 0; }

.embed-body { background: transparent; font-size: 16px; }
.embed-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-align: center; }
.embed-card .total { margin-top: 0; font-size: 28px; }

.cover { margin: 0; }
.cover img { display: block; width: 100%; height: auto; }
