/* =========================================================
   하루틴 (Harutin) — Legal Pages Common Stylesheet
   Paper-tone theme, mobile responsive, print friendly
   ========================================================= */

:root {
  --paper: #EDEBEA;
  --paper-card: #F7F6F5;
  --ink: #2B2A28;
  --ink-soft: #55534F;
  --ink-faint: #8A8782;
  --line: #DAD7D3;
  --accent: #3E6E8E;
  --accent-soft: #5C89A6;
  --accent-bg: #E3ECF1;
  --radius: 14px;
  --maxw: 760px;
  --serif: "Nanum Myeongjo", "Noto Serif KR", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans KR", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 22px 96px;
}

/* Language toggle (top-right) */
.lang-toggle {
  position: absolute;
  top: 20px;
  right: 22px;
  display: inline-flex;
  gap: 2px;
  font-size: 13px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  z-index: 20;
}
.lang-toggle a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 12px;
  border-radius: 999px;
  line-height: 1.4;
  transition: background .15s, color .15s;
}
.lang-toggle a.active { background: var(--accent); color: #fff; }
.lang-toggle a:not(.active):hover { color: var(--accent); }

/* ---------- Header ---------- */
header.doc-head {
  position: relative;
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}
.brand:hover { color: var(--accent); }

h1.doc-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.doc-meta {
  font-size: 13.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.doc-meta strong { color: var(--ink-soft); font-weight: 600; }

/* ---------- Table of contents ---------- */
nav.toc {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 40px;
  font-size: 14px;
}
nav.toc .toc-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
nav.toc ol {
  margin: 0; padding: 0; list-style: none;
  columns: 2; column-gap: 26px;
}
nav.toc li { margin: 0 0 6px; break-inside: avoid; }
nav.toc a {
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
}
nav.toc a .num { color: var(--accent-soft); font-variant-numeric: tabular-nums; }
nav.toc a:hover { color: var(--accent); }

/* ---------- Sections ---------- */
section.art { margin: 0 0 34px; scroll-margin-top: 20px; }
h2.art-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-top: 6px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h2.art-title .art-no {
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}
h3.sub {
  font-size: 15.5px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--ink);
}

p { margin: 0 0 12px; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

ul, ol.list { margin: 0 0 14px; padding-left: 20px; }
li { margin: 0 0 7px; color: var(--ink-soft); }
li::marker { color: var(--accent-soft); }

/* ---------- Callout / notice ---------- */
.notice {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 18px;
  font-size: 14.5px;
}
.notice p { color: var(--ink); margin: 0; }
.notice p + p { margin-top: 8px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--paper-card);
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #E7E4E1;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
td { color: var(--ink-soft); }
tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
footer.doc-foot {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.7;
}
footer.doc-foot a { color: var(--accent); text-decoration: none; }
footer.doc-foot a:hover { text-decoration: underline; }

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

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .page { padding: 26px 18px 72px; }
  h1.doc-title { font-size: 25px; }
  nav.toc ol { columns: 1; }
  .lang-toggle { position: static; float: right; margin: -4px 0 12px; }
  header.doc-head { padding-top: 6px; }
}

/* ---------- Print ---------- */
@media print {
  :root { --paper: #fff; }
  body { background: #fff; font-size: 11pt; line-height: 1.55; color: #000; }
  .lang-toggle, .brand { display: none; }
  .page { max-width: 100%; padding: 0; }
  nav.toc { break-inside: avoid; background: none; border-color: #ccc; }
  .notice { background: none; border-left: 2px solid #000; }
  table, th, td { border-color: #999; }
  th { background: #eee; }
  section.art { break-inside: avoid-page; }
  a { color: #000; text-decoration: none; }
}

/* =========================================================
   Landing page specific
   ========================================================= */
.landing { max-width: 620px; margin: 0 auto; padding: 72px 24px 96px; text-align: center; }
.landing .logo {
  font-family: var(--serif);
  font-size: 40px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.landing .logo .accent { color: var(--accent); }
.landing .tagline { color: var(--ink-faint); font-size: 15px; margin: 0 0 40px; }
.landing .intro {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-soft);
  text-align: left;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 0 0 32px;
}
.store-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 0 40px; }
.store-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 11px 20px;
  min-width: 180px;
  opacity: 0.55;
  cursor: default;
}
.store-btn .small { font-size: 11px; opacity: 0.8; }
.store-btn .big { font-size: 16px; font-weight: 600; }
.store-btn .soon {
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-soft); margin-top: 2px;
}
.doc-links { display: flex; flex-direction: column; gap: 10px; max-width: 340px; margin: 0 auto 44px; }
.doc-link {
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 20px;
  color: var(--ink);
  font-size: 15px;
  transition: border-color .15s, transform .1s;
}
.doc-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.doc-link .arrow { color: var(--accent); }
.landing .contact { font-size: 14px; color: var(--ink-faint); }
.landing .contact a { color: var(--accent); text-decoration: none; }
.landing .lang-mini { margin-top: 30px; font-size: 13px; color: var(--ink-faint); }
.landing .lang-mini a { color: var(--accent-soft); text-decoration: none; }
