/* Date Calculator. Cool paper and navy ink; the result is a pair of tear-off calendar leaves with the span between them. */
:root {
  --bg: #eef2f6;
  --paper: #ffffff;
  --ink: #14213d;
  --ink-soft: #5c6b80;
  --line: #d3dbe5;
  --red: #d7263d;
  --red-dark: #a91b2e;
  --display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --text: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1.05rem; line-height: 1.6; }
a { color: var(--red-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 56rem; margin: 0 auto; padding: 0 1.25rem; }

.site-header { padding: 1.1rem 0 0.4rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; margin: 1.5rem 0 0.5rem; }
h2 { font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.2; margin: 2.75rem 0 0.75rem; }
.lede { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 1.5rem; font-size: 1.1rem; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 0.9rem; }

.tool { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem; }
.fields { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; }
.fields label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; font-size: 0.95rem; flex: 1 1 12rem; }
.tool input, .tool select { font: inherit; font-size: 1.1rem; padding: 0.5rem 0.6rem; border: 2px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); min-width: 0; width: 100%; }
.tool input:focus, .tool select:focus { outline: none; border-color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.9rem; font-size: 0.97rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--red); }

/* Result: calendar leaves */
.result { margin-top: 1.4rem; }
.span { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.leaf { width: 8.5rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-align: center; box-shadow: 0 8px 18px -12px rgba(20, 33, 61, 0.45); }
.leaf-label { display: block; font-size: 0.8rem; color: var(--ink-soft); padding-top: 0.25rem; background: var(--red); color: #fff; }
.leaf-month { display: block; background: var(--red); color: #fff; font-weight: 600; padding: 0 0 0.35rem; font-size: 0.95rem; }
.leaf-day { display: block; font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: 1.1; padding-top: 0.3rem; }
.leaf-wd { display: block; color: var(--ink-soft); font-size: 0.85rem; padding-bottom: 0.5rem; }
.span-count { display: flex; flex-direction: column; align-items: center; min-width: 9rem; padding: 0 0.5rem; position: relative; }
.span-count::before { content: ""; position: absolute; top: 50%; left: -0.6rem; right: -0.6rem; border-top: 2px dashed var(--line); z-index: 0; }
.span-count strong, .span-count span { position: relative; background: var(--paper); padding: 0 0.4rem; z-index: 1; }
.span-count strong { font-family: var(--display); font-weight: 800; font-size: 2.8rem; line-height: 1; }
.span-count span { color: var(--ink-soft); font-size: 0.95rem; }
.facts { list-style: none; padding: 0; margin: 1.3rem auto 0; max-width: 32rem; }
.facts li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.answer { text-align: center; font-family: var(--display); font-size: 1.4rem; margin: 1rem 0 0; }
.answer strong { font-size: 2.2rem; }
.empty { color: var(--ink-soft); text-align: center; margin: 0.5rem 0; }
.fine { color: var(--ink-soft); font-size: 0.9rem; text-align: center; max-width: 34rem; margin: 0.7rem auto 0; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.95rem; }
caption { text-align: left; font-family: var(--display); font-weight: 800; font-size: 1.3rem; padding: 0.3rem 0; }
th, td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); font-weight: 600; }

details { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; margin: 0 0 0.6rem; padding: 0.7rem 1rem; max-width: var(--measure); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0.1rem; }

.site-footer { margin-top: 4rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.site-footer a { color: var(--ink-soft); }
@media (max-width: 560px) { .span-count { min-width: 100%; order: 3; padding: 0.6rem 0; } .span-count::before { display: none; } .leaf { width: 7.5rem; } }
