:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1f36;
  --text-muted: #5b6478;
  --border: #e3e6ee;
  --primary: #185fa5;
  --primary-dark: #0c447c;
  --accent: #1d9e75;
  --accent-bg: #f0f7f3;
  --accent-border: #c9e8d8;
  --radius: 10px;
  --max-width: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}
.site-header .wrap {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-weight: 700; font-size: 17px; color: var(--text); }
.logo span { color: var(--primary); }
.nav a { margin-left: 18px; color: var(--text-muted); font-size: 14px; }
.nav a:hover { color: var(--primary); text-decoration: none; }

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 60px;
}

h1 { font-size: 28px; line-height: 1.25; margin-bottom: 12px; font-weight: 700; }
h2 { font-size: 20px; margin: 32px 0 10px; font-weight: 600; }
p { margin-bottom: 14px; }
.lead { font-size: 17px; color: var(--text-muted); margin-bottom: 24px; }
.muted { color: var(--text-muted); }

/* Calculator card */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.calc-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}
@media (max-width: 640px) {
  .calc-form { grid-template-columns: 1fr; }
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); }

/* Result box */
.result {
  margin-top: 24px;
  padding: 22px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
}
.result-date {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.result-meta { font-size: 14px; color: var(--text-muted); }
.skipped-list { margin-top: 14px; }
.skipped-list li {
  margin: 4px 0;
  color: var(--text-muted);
  list-style: none;
  font-size: 14px;
}
.skipped-list li::before { content: "\2014  "; }

/* Hero result (long-tail pages) */
.hero-result {
  text-align: center;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
}
.hero-result .big-date {
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.hero-result .sub { color: var(--text-muted); font-size: 15px; }
.hero-result .extra {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Related links */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.related a {
  display: block;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}
.related a:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* Holiday table */
.holiday-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
.holiday-table th,
.holiday-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.holiday-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer a { color: var(--text-muted); margin: 0 8px; }

.note { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
ul.clean { padding-left: 20px; margin-bottom: 14px; }
ul.clean li { margin: 4px 0; }
