:root {
  --bg: #f4f1eb;
  --card-bg: #fffdf9;
  --border: #ddd8ce;
  --border-dark: #c5bfb4;
  --text-main: #1d2925;
  --text-muted: #52615a;
  --text-sub: #6d786f;
  --accent: #1e4a38;
  --accent-hover: #123125;
  --tag-bg: #e8efe9;
  --tag-text: #1e4a38;
  --tag-border: #cfded2;
  --highlight-bg: #ede8de;
  --alert-bg: #fdf5f4;
  --alert-border: #ebd3cf;
  --alert-text: #8c281e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.landing-page .container,
.mailbox-page .container {
  max-width: 680px;
}

.masthead {
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.back-nav {
  margin-bottom: 0.75rem;
}

.back-nav a,
.item-link,
footer a {
  color: var(--accent);
  text-decoration: none;
}

.back-nav a,
.item-link {
  font-size: 0.88rem;
  font-weight: 600;
}

.back-nav a:hover,
.item-link:hover,
footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.brand-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.landing-page .brand-title,
.mailbox-page .brand-title {
  text-transform: uppercase;
}

.guide-page .brand-title {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.brand-title span {
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--tag-border);
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.target-audience {
  margin: 0.5rem 0 0.25rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prepared-by {
  margin: 0 0 1rem;
  color: var(--text-sub);
  font-size: 0.88rem;
  font-style: italic;
}

.tagline {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.tagline-tight {
  margin-bottom: 0.75rem;
}

.meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 500;
}

.meta-bar span + span::before {
  content: "•";
  margin-right: 1rem;
  color: var(--border-dark);
}

.section-header,
.part-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-header {
  margin: 2.25rem 0 1rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.part-header {
  margin: 2.5rem 0 1rem;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  font-weight: 900;
  border-left-width: 5px;
}

.item,
.card,
.action-box {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
}

.item-title,
.card h2 {
  margin: 0 0 0.5rem;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.item-title a {
  color: var(--text-main);
  text-decoration: none;
}

.item-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.read-time {
  color: var(--text-sub);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.summary,
.card p,
.action-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.summary {
  margin: 0 0 0.85rem;
}

.card p {
  margin: 0 0 0.75rem;
}

.card p:last-child,
.action-box p,
.summary-close {
  margin-bottom: 0;
}

.card h3,
.action-box h3 {
  margin: 0 0 0.5rem;
  color: var(--text-main);
  font-size: 1.05rem;
}

.takeaway {
  padding: 0.6rem 0.85rem;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--highlight-bg);
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.45;
}

.takeaway strong {
  color: var(--text-main);
  font-weight: 700;
}

.item-link {
  display: inline-block;
  margin-top: 0.75rem;
}

.action-box {
  margin: 2.25rem 0 1rem;
  border-left: 4px solid var(--accent);
}

.alert-card,
.alert-box {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--alert-border);
  border-radius: 6px;
  background: var(--alert-bg);
}

.alert-card h2,
.alert-box h3 {
  margin: 0 0 0.5rem;
  color: var(--alert-text);
  font-size: 1.1rem;
  font-weight: 700;
}

.alert-card p,
.alert-box p {
  margin: 0;
  color: #7f1d1d;
  font-size: 0.95rem;
  line-height: 1.55;
}

ul,
ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

li {
  margin-bottom: 0.35rem;
}

.guide-parts {
  margin-bottom: 1rem;
}

.table-wrapper {
  margin: 1rem 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  background: var(--card-bg);
  font-size: 0.85rem;
  line-height: 1.45;
}

th,
td {
  padding: 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--tag-bg);
  color: var(--text-main);
  font-weight: 700;
}

td {
  color: var(--text-muted);
}

td strong {
  color: var(--text-main);
}

tr:nth-child(even) td {
  background: #faf8f3;
}

tr:last-child td {
  border-bottom: 0;
}

.summary-box {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--tag-bg);
}

.summary-box h2 {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 1.25rem;
}

.summary-box p {
  margin: 0 0 0.75rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

.summary-list {
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 520px) {
  .container {
    padding: 1.5rem 1rem 3rem;
  }

  .brand-title,
  .guide-page .brand-title {
    font-size: 1.45rem;
  }

  .meta-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .meta-bar span + span::before {
    content: none;
  }

  .section-header,
  .part-header {
    line-height: 1.35;
  }
}
