/* the monthly - one stylesheet, system fonts only */
:root {
  --paper: #F1F3F0;
  --paper-2: #E6EAE6;
  --ink: #18222C;
  --steel: #566370;
  --rule: #C8CFD2;
  --detect: #B86E00;
  --resolved: #2F7A57;
  --error: #A3342B;
  --focus: #1D5FA8;
  --wrap: 72rem;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
          system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}
html:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); letter-spacing: -0.025em; line-height: 1.12; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.1875rem; color: var(--steel); max-width: 38em; }
.prose > * { max-width: 44rem; }
.prose ul { padding-left: 1.2em; }

/* masthead */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead-inner { display: flex; align-items: center; gap: 2rem; min-height: 4.25rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; }
.wordmark img { border-radius: 50%; }
.mainnav { display: flex; gap: 1.5rem; margin-right: auto; }
.mainnav a { text-decoration: none; color: var(--steel); padding: .25rem 0; border-bottom: 2px solid transparent; }
.mainnav a:hover { color: var(--ink); }
.mainnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.langswitch { font-size: .95rem; color: var(--steel); }

/* hero with the operating cycle */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.cycle { margin: 0; }
.cycle figcaption { font-size: .95rem; color: var(--steel); margin-bottom: .75rem; }
.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  position: relative; aspect-ratio: 1 / 1; background: var(--paper-2);
  border-radius: 2px; font-variant-numeric: tabular-nums;
}
.day .num { position: absolute; top: .3rem; left: .4rem; font-size: .78rem; color: var(--steel); }
.day::after { content: ""; position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); }
.day-watch::after { width: 6px; height: 6px; border-radius: 50%; background: var(--steel); opacity: .55; }
.day-review { box-shadow: inset 0 0 0 2px var(--ink); }
.day-review::after { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.day-baseline { background: var(--detect); }
.day-report { background: var(--resolved); }
.day-baseline .num, .day-report .num { color: #fff; }

.legend { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; font-size: .9rem; color: var(--steel); }
.key { display: flex; align-items: center; gap: .5rem; }
.key::before { content: ""; flex: none; width: .9rem; height: .9rem; border-radius: 2px; background: var(--paper-2); }
.key-baseline::before { background: var(--detect); }
.key-report::before { background: var(--resolved); }
.key-review::before { box-shadow: inset 0 0 0 2px var(--ink); }
.key-watch::before { background: radial-gradient(circle, var(--steel) 0 3px, var(--paper-2) 3.5px); }

/* one load sequence: the month fills in, row by row */
@media (prefers-reduced-motion: no-preference) {
  .day { animation: fill .5s ease-out both; }
  .day:nth-child(n+8)  { animation-delay: .12s; }
  .day:nth-child(n+15) { animation-delay: .24s; }
  .day:nth-child(n+22) { animation-delay: .36s; }
  .day:nth-child(n+29) { animation-delay: .48s; }
  @keyframes fill { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* bands */
.band { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.band-rule { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: #F7F8F6; }
.pagehead { padding: clamp(3rem, 6vw, 5rem) 0 1rem; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
.pillars article { padding: 0 1.75rem; border-left: 1px solid var(--rule); }
.pillars article:first-child { padding-left: 0; border-left: 0; }
.pillars p { color: var(--steel); margin: 0; }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 1.5rem; }
.services ul { margin: 0; padding-left: 1.1em; color: var(--steel); }
.services li { margin-bottom: .45em; }
.services h3 { padding-top: .9rem; border-top: 3px solid var(--ink); }

.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block; font-size: 2.6rem; font-weight: 700; line-height: 1;
  color: var(--rule); font-variant-numeric: tabular-nums; margin-bottom: .6rem;
}
.steps p { color: var(--steel); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.plain { list-style: none; padding: 0 !important; }
.plain li { padding: .7rem 0; border-top: 1px solid var(--rule); color: var(--steel); }
.plain li:last-child { border-bottom: 1px solid var(--rule); }

.stack { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.stack li { padding: .3rem .75rem; border: 1px solid var(--rule); border-radius: 999px; font-size: .95rem; color: var(--steel); background: #fff; }

.callout > * { max-width: 44rem; }

/* buttons */
.button {
  display: inline-block; padding: .8rem 1.35rem; border: 2px solid var(--ink); border-radius: 3px;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { background: #26333F; border-color: #26333F; }
.button-quiet { background: transparent; color: var(--ink); }
.button-quiet:hover { background: var(--ink); color: var(--paper); }
.button[disabled] { opacity: .6; cursor: progress; }

/* support form */
.formwrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.supportform { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.req { font-weight: 400; font-size: .8rem; color: var(--steel); margin-left: .35rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #9AA5AC; border-radius: 3px; padding: .65rem .75rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 10rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); }
.field .err { display: none; color: var(--error); font-size: .9rem; margin: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field.invalid .err { display: block; }
.field-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; align-items: start; }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; }
.consent label { font-weight: 400; }
.consent .err { grid-column: 2; }
.submitrow { flex-direction: row; align-items: center; gap: 1rem; flex-wrap: wrap; }
.status { margin: 0; }
.status.ok { color: var(--resolved); font-weight: 600; }
.status.bad { color: var(--error); }
.formside h2 { font-size: 1.15rem; }
.formside p { color: var(--steel); }

.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal h2:first-child { margin-top: 0; }

/* footer */
.colophon { background: var(--ink); color: #C9D1D6; padding: 2.75rem 0 2rem; font-size: .92rem; }
.colophon a { color: #fff; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem; margin: 0 0 2rem; }
.facts dt { color: #8D9AA4; font-size: .82rem; }
.facts dd { margin: 0; }
.fineprint { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; border-top: 1px solid #33414D; padding-top: 1.25rem; margin: 0; }
.fineprint span { margin-left: auto; color: #8D9AA4; }

@media (max-width: 880px) {
  .hero-inner, .split, .formwrap { grid-template-columns: 1fr; }
  .cycle { max-width: 26rem; }
  .pillars, .services { grid-template-columns: 1fr; gap: 1.75rem; }
  .pillars article { padding: 1.25rem 0 0; border-left: 0; border-top: 1px solid var(--rule); }
  .pillars article:first-child { padding-top: 0; border-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .masthead-inner { flex-wrap: wrap; gap: .4rem 1rem; padding: .75rem 1.5rem; }
  .mainnav { order: 3; width: 100%; gap: 1.1rem; overflow-x: auto; font-size: .95rem; }
  .langswitch { margin-left: auto; }
  .supportform, .steps, .facts { grid-template-columns: 1fr; }
  .fineprint span { margin-left: 0; width: 100%; }
}
