@import url('https://fonts.googleapis.com/css2?family=Gaegu:wght@400&family=Gothic+A1:wght@400;500;700;800&display=swap');

:root { --font-gothic: 'Gothic A1'; --font-gaegu: 'Gaegu'; }

/* =====================================================================
   Flax Guide  ·  printable-worksheet / fillable-form architecture
   flax beige paper, pencil-blue ink, soft ruled gridlines.
   ===================================================================== */

:root {
  --flax: #efe7d6;
  --flax-edge: #e2d7bf;
  --paper: #fffdf6;
  --ink: #2b2a24;
  --muted: #726c5d;
  --pencil: #3f5b7a;
  --pencil-soft: rgba(63, 91, 122, 0.55);
  --pencil-faint: rgba(63, 91, 122, 0.14);
  --rule: rgba(63, 91, 122, 0.16);
  --rule-strong: rgba(63, 91, 122, 0.34);
  --beige-line: #d8cbb1;
  --beige-line-soft: #e7ddc8;
  --radius: 4px;
  --sheet-pad: 30px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-gothic), system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--flax);
  background-image:
    linear-gradient(var(--flax-edge) 1px, transparent 1px),
    linear-gradient(90deg, var(--flax-edge) 1px, transparent 1px);
  background-size: 26px 26px;
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: -0.003em;
}

.handwrite {
  font-family: var(--font-gaegu), var(--font-gothic), system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--pencil);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pencil);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 50;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ---- the sheet of paper on the desk -------------------------------- */
.paper {
  max-width: 980px;
  margin: 28px auto 40px;
  background: var(--paper);
  border: 1px solid var(--beige-line);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 18px 44px rgba(64, 54, 28, 0.12);
  position: relative;
  /* faint notebook ruled lines + a pencil-blue left margin rule */
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 25px,
      var(--rule) 25px,
      var(--rule) 26px
    );
  background-position: 0 0;
}
.paper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 46px;
  width: 1px;
  background: var(--pencil-soft);
  opacity: 0.5;
}

/* =====================================================================
   FORM HEADER BLOCK  (title plate + ruled 이름/날짜/항목 fields)
   not a glyph+wordmark+nav bar
   ===================================================================== */
.form-header {
  padding: 30px 40px 22px 64px;
  border-bottom: 2px solid var(--ink);
}
.form-plate {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px 22px 16px;
  background: var(--paper);
  position: relative;
}
.form-plate-id {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  top: -13px;
  left: 18px;
  background: var(--paper);
  padding: 0 8px;
}
.form-plate-stamp {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--pencil);
  border: 1.5px solid var(--pencil);
  border-radius: 3px;
  padding: 1px 7px;
}
.form-plate-no {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.form-plate-titleblock {
  text-align: center;
  padding: 6px 0 14px;
  border-bottom: 1px dashed var(--rule-strong);
}
.form-plate-eyebrow {
  margin: 0 0 4px;
  font-size: 12.5px;
  letter-spacing: 0.34em;
  color: var(--pencil);
  font-weight: 700;
}
.form-plate-title {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.form-plate-title a {
  color: var(--ink);
  text-decoration: none;
}
.form-plate-title a:hover {
  color: var(--pencil);
}
.form-plate-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.form-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 26px;
  margin: 14px 0 0;
}
.form-field {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.form-field dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.form-field dt::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-right: 1.5px solid var(--pencil-soft);
  border-bottom: 1.5px solid var(--pencil-soft);
  transform: translateY(-2px) rotate(-45deg);
}

/* dotted fill-in line (ruled form field) */
.fill-line {
  flex: 1;
  min-width: 0;
  margin: 0;
  border-bottom: 1.5px dotted var(--pencil-soft);
  padding: 0 2px 3px;
  min-height: 22px;
  display: flex;
  align-items: flex-end;
}
.fill-hint {
  color: var(--pencil-soft);
  font-size: 15px;
  opacity: 0.85;
}
.fill-val {
  color: var(--pencil);
  font-weight: 600;
  font-size: 14.5px;
}

/* =====================================================================
   HOME  ·  stack of worksheet "시트" sections
   ===================================================================== */
.sheet-stack {
  padding: 26px 40px 30px 64px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sheet {
  position: relative;
  border: 1.5px solid var(--beige-line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: var(--sheet-pad);
  box-shadow: 0 1px 0 var(--beige-line-soft);
}
.sheet-tab {
  position: absolute;
  top: -1px;
  right: 22px;
  transform: translateY(-50%);
  background: var(--pencil);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 12px;
  border-radius: 2px;
}
.sheet-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--pencil);
  border: 1px solid var(--pencil-faint);
  background: rgba(63, 91, 122, 0.06);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.sheet-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sheet-intro {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 15.5px;
}
.sheet-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}
.sheet-head {
  margin-bottom: 18px;
}

/* lead worksheet (오늘의 준비 시트) */
.sheet-lead {
  padding: 0;
  overflow: hidden;
  border-color: var(--ink);
  border-width: 2px;
}
.lead-cover {
  height: 188px;
  background-color: var(--pencil);
  background-image:
    linear-gradient(135deg, rgba(63, 91, 122, 0.85), rgba(63, 91, 122, 0.35)),
    url("/images/flaxguide-lead.jpg");
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--ink);
}
.lead-body {
  padding: 26px var(--sheet-pad) var(--sheet-pad);
}
.lead-body .sheet-title {
  font-size: 27px;
}

/* labeled field rows with dotted fill lines */
.field-rows {
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.field-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.field-row dt {
  flex: 0 0 110px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

/* checkbox rows (drawn box marker) */
.check-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.check-box {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  border: 1.6px solid var(--pencil);
  border-radius: 3px;
  background: var(--paper);
  position: relative;
}
.check-box.checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--pencil);
  border-bottom: 2px solid var(--pencil);
  transform: rotate(40deg);
}
.check-text {
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.5;
}
.check-text.handwrite {
  font-size: 17px;
  color: #34507a;
}

/* memo lined area */
.memo {
  margin-top: 22px;
  border-top: 1px dashed var(--rule-strong);
  padding-top: 12px;
}
.memo-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pencil);
  margin-bottom: 8px;
}
.memo-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.memo-lines span {
  display: block;
  height: 0;
  border-bottom: 1.5px dotted var(--pencil-soft);
}

.sheet-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 34px;
}
.sheet-cols .field-rows,
.sheet-cols .check-list {
  margin-top: 4px;
}

/* published worksheet index */
.index-rows {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  counter-reset: none;
}
.index-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1.5px dotted var(--rule-strong);
}
.index-row:first-child {
  border-top: 1.5px dotted var(--rule-strong);
}
.index-no {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--pencil);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.index-link {
  flex: 1;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.index-link:hover {
  color: var(--pencil);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.index-date {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--muted);
}

/* rules sheet */
.rules-list {
  margin-top: 16px;
}
.sheet-foot-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-strong);
  font-size: 13.5px;
  color: var(--muted);
}

/* =====================================================================
   ARTICLE  ·  structured worksheet
   ===================================================================== */
.article-stack {
  gap: 0;
}
.worksheet-article {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 34px 36px 30px;
}
.article-formhead {
  position: relative;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.article-title {
  margin: 6px 0 16px;
  font-size: 30px;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -0.014em;
}
.article-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
  margin: 0;
}
.article-fields .field-row dt {
  flex: 0 0 56px;
}

/* form field section captions */
.field-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--paper);
  background: var(--pencil);
  padding: 3px 11px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.intro-field {
  margin-bottom: 22px;
}
.intro-text {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--ink);
  background: rgba(63, 91, 122, 0.05);
  border-left: 3px solid var(--pencil);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
}

.memo-field {
  margin-bottom: 26px;
}

/* injected post.content rendered inside the 정리 · 메모 worksheet field */
.article-content {
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 33px,
    var(--rule) 33px,
    var(--rule) 34px
  );
  background-position: 0 18px;
  padding: 20px 22px 8px;
}
.article-content > *:first-child {
  margin-top: 0;
}
.article-content p {
  margin: 0 0 17px;
  font-size: 16px;
  line-height: 1.85;
}
.article-content h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 30px 0 12px;
  padding-left: 16px;
  position: relative;
  letter-spacing: -0.01em;
}
.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  background: var(--pencil);
  border-radius: 2px;
}
.article-content h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 22px 0 10px;
}
.article-content blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: rgba(63, 91, 122, 0.06);
  border: 1px solid var(--pencil-faint);
  border-left: 4px solid var(--pencil);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #34465c;
  font-size: 16px;
}
.article-content blockquote p {
  margin: 0;
}
.article-content ul,
.article-content ol {
  margin: 0 0 18px;
  padding-left: 4px;
  list-style: none;
}
.article-content ul li,
.article-content ol li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
}
.article-content ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--pencil);
  border-radius: 3px;
  background: var(--paper);
}
.article-content ol {
  counter-reset: flax-ol;
}
.article-content ol li {
  counter-increment: flax-ol;
}
.article-content ol li::before {
  content: counter(flax-ol);
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 800;
  color: var(--paper);
  background: var(--pencil);
  border-radius: 3px;
  text-align: center;
  line-height: 18px;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 14.5px;
  background: var(--paper);
}
.article-content thead th {
  background: rgba(63, 91, 122, 0.1);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
}
.article-content tbody td {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  vertical-align: top;
}
.article-content tbody tr:nth-child(even) td {
  background: rgba(63, 91, 122, 0.035);
}
.article-content a {
  color: var(--pencil);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-content a:hover {
  text-decoration-thickness: 2px;
}

/* FAQ as details */
.faq-field {
  margin-bottom: 26px;
}
.faq-field h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 14px;
}
.faq-field details {
  border: 1.5px solid var(--beige-line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0 16px;
  margin-bottom: 10px;
}
.faq-field summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  padding: 13px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-field summary::-webkit-details-marker {
  display: none;
}
.faq-field summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--pencil);
  border-bottom: 2px solid var(--pencil);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.faq-field details[open] summary::after {
  transform: rotate(-135deg);
  top: 21px;
}
.faq-field details p {
  margin: 0 0 14px;
  padding-top: 2px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
  border-top: 1px dashed var(--rule);
  padding-top: 12px;
}

/* sources note */
.source-field {
  margin-bottom: 22px;
}
.source-field h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 10px;
}
.source-field p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.75;
}

.article-foot {
  border-top: 2px dashed var(--rule-strong);
  padding-top: 18px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--pencil);
  text-decoration: none;
}
.back-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--pencil);
  border-bottom: 2px solid var(--pencil);
  transform: rotate(45deg);
}
.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =====================================================================
   FORM FOOTER
   ===================================================================== */
.form-footer {
  border-top: 2px solid var(--ink);
  padding: 22px 40px 28px 64px;
}
.form-footer-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.form-footer-label {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.form-footer-fine {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* =====================================================================
   RESPONSIVE  ·  collapse gracefully on narrow viewports
   ===================================================================== */
@media (max-width: 760px) {
  body {
    font-size: 15.5px;
  }
  .paper {
    margin: 0;
    border-left: none;
    border-right: none;
  }
  .paper::before {
    left: 20px;
  }
  .form-header {
    padding: 22px 18px 18px 30px;
  }
  .form-fields {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .form-plate-title {
    font-size: 27px;
  }
  .sheet-stack {
    padding: 20px 18px 24px 30px;
  }
  .sheet {
    padding: 22px 18px;
  }
  .sheet-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .field-row dt {
    flex-basis: 84px;
  }
  .worksheet-article {
    padding: 24px 18px 24px;
  }
  .article-title {
    font-size: 24px;
  }
  .article-fields {
    grid-template-columns: 1fr;
  }
  .article-content {
    padding: 16px 14px 6px;
  }
  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .index-row {
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  .index-date {
    flex-basis: 100%;
  }
  .form-footer {
    padding: 20px 18px 24px 30px;
  }
}
