:root {
  --page-width: 700px;
  --page-pad: clamp(16px, 4vw, 28px);
  --blue-dark: #315f86;
  --blue-mid: #6f9ec3;
  --blue-soft: #eaf3fb;
  --blue-pale: #f5faff;
  --border: #c9dceb;
  --text: #263746;
  --muted: #5d7080;
  --white: #ffffff;
  --shadow: 0 8px 26px rgba(49, 95, 134, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.58;
  color: var(--text);
  background: linear-gradient(180deg, #f7fbff 0%, #eef6fc 100%);
}

.page {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: var(--page-pad);
}

.site-header,
.site-footer,
.intro-card,
.tips-card,
.letter-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.site-header {
  overflow: hidden;
  margin-bottom: 22px;
  text-align: center;
}

.brand-strip {
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 18px;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 26px auto 8px;
  padding: 0 20px;
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  line-height: 1.18;
  color: var(--blue-dark);
}

.subtitle {
  margin: 0 auto 20px;
  padding: 0 20px;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.top-actions {
  padding: 0 20px 24px;
}

.button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--blue-dark);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(49, 95, 134, 0.2);
}

.button:hover,
.button:focus {
  background: #244d70;
}

.intro-card,
.tips-card,
.letter-section {
  padding: clamp(18px, 4vw, 28px);
  margin-bottom: 22px;
}

h2 {
  margin: 0 0 14px;
  color: var(--blue-dark);
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  line-height: 1.25;
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 8px 0 16px 1.3rem;
  padding: 0;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--blue-dark);
  overflow-wrap: anywhere;
}

.link-card {
  background: var(--blue-soft);
  border-left: 5px solid var(--blue-mid);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0;
}

.tips-card {
  background: var(--blue-pale);
}

.letter-section {
  border-top: 7px solid var(--blue-mid);
}

.letter-section.sample {
  border-top-color: var(--blue-dark);
}

.letter-box {
  background: #ffffff;
  border: 1px solid #dbe8f2;
  border-radius: 14px;
  padding: clamp(16px, 4vw, 24px);
}

.letter-box p:last-child,
.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer {
  text-align: center;
  padding: 24px 18px;
  margin-top: 28px;
  color: var(--muted);
}

.site-footer .button {
  margin-bottom: 14px;
}

@media print {
  body {
    background: #ffffff;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .site-header,
  .site-footer,
  .intro-card,
  .tips-card,
  .letter-section {
    box-shadow: none;
    break-inside: avoid;
  }

  .button {
    display: none;
  }
}
