/* ============================================================
   Theme: Paper  —  light editorial / warm print
   ============================================================ */

:root {
  --paper:    #f7f3ea;
  --paper-2:  #efe8da;
  --ink:      #23201a;
  --muted:    #7d7466;
  --line:     #ded4c2;
  --accent:   #b4552d;
  --accent-2: #2f6b57;
  --glow-1:   rgba(180, 85, 45, .10);
  --radius:   4px;
  --max:      1000px;
  --serif:    "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:     "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(35, 32, 26, .028) 0 1px, transparent 1px 26px),
    radial-gradient(900px 500px at 50% -10%, var(--glow-1), transparent 70%);
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 26px 60px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 46px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.brand .mark {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  background: var(--accent);
  transform: rotate(45deg);
}

.legal-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.legal-nav a {
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.legal-nav a:hover { color: var(--ink); }
.legal-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding: 18px 0 52px; max-width: 760px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  padding: 5px 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: .73rem;
  font-family: var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-2);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.9s steps(1, end) infinite;
}

@keyframes blink { 50% { opacity: .15; } }

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6.4vw, 3.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
}

.tagline {
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-style: italic;
  color: var(--accent-2);
}

.intro { margin: 0; max-width: 640px; color: var(--muted); }

/* ---------- cards ---------- */

.card {
  padding: 34px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(60, 50, 35, .07);
}

.card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
}

.muted { margin: 0 0 24px; color: var(--muted); font-size: .95rem; }

/* ---------- form ---------- */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, color .18s;
}

.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:disabled { opacity: .5; cursor: progress; }
.btn.ghost:hover { background: var(--paper-2); }

.status { min-height: 20px; margin: 14px 0 0; font-size: .92rem; color: var(--muted); }
.status.ok  { color: var(--accent-2); }
.status.err { color: #a32b2b; }

/* ---------- developer ---------- */

.dev {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
}

.dev > div {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
}

.dev dt {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dev dd { margin: 5px 0 0; font-weight: 600; word-break: break-word; }

/* ---------- legal pages ---------- */

.legal { padding: 0; max-width: 760px; margin: 0 auto; }

.crumbs {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 16px;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs span { opacity: .5; }

.legal h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -.02em;
}

.updated {
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
  font-size: .84rem;
  color: var(--muted);
}

.legal article { padding: 0; }

.legal article .sec { border-top: 1px solid var(--line); }
.legal article .sec:first-child { border-top: 0; }

.legal article .sec > h2,
.legal article .sec > summary {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 32px 0 10px;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 700;
  list-style: none;
}
.legal article .sec:first-child > :is(h2, summary) { margin-top: 0; }

.legal article summary { cursor: pointer; user-select: none; -webkit-user-select: none; transition: color .18s; }
.legal article summary::-webkit-details-marker { display: none; }
.legal article summary::marker { content: ""; }
.legal article summary:hover { color: var(--accent); }
.legal article summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.legal article summary::after {
  content: "+";
  margin-left: auto;
  padding-left: 16px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.legal article details[open] > summary::after { content: "\2212"; }

.legal article .sec > h2 .num,
.legal article .sec > summary .num {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
}

.legal article .sec-body { padding-bottom: 2px; }

.legal article p { margin: 0 0 15px; }

.legal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- footer ---------- */

.footer {
  margin-top: 50px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--muted);
}
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.footer p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .shell { padding: 22px 18px 48px; }
  .card { padding: 24px 20px; }
  .topbar { margin-bottom: 34px; }
  .hero { padding: 8px 0 38px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- generated palette for nguyenvanhao.info ---------- */

:root {
  --accent:   #867428;
  --accent-2: #2d595c;
  --glow-1:   rgba(207, 178, 48, .13);
  --radius:   4px;
}
