:root {
  --bg: #ffffff;
  --accent: #df0024;
  --accent-dark: #b9001d;
  --muted: #0f1720;
  --muted-2: #6b7280;
  --surface: #fbfbfc;
  --line: #e5e7eb;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--muted);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { min-width: 320px; margin: 0; padding: 0; background: var(--bg); color: var(--muted); -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.page-wrapper { display: flex; min-height: 100vh; flex-direction: column; }
.page-frame { display: flex; flex: 1; width: 100%; max-width: none; flex-direction: column; }
.main-content { flex: 1; }
.brand-banner, .content-shell { width: min(1028px, calc(100% - 72px)); margin-right: auto; margin-left: auto; }

.brand-banner { display: flex; flex-direction: column; gap: 12px; margin-top: 36px; padding: 12px; border-radius: 15px 0 15px 0; background: linear-gradient(-90deg, #c70021, #df0024); box-shadow: 0 5px 20px rgba(15, 23, 32, 0.06); }
.brand-banner-row { display: flex; width: 100%; align-items: center; gap: 1rem; padding: 0 10px; border-radius: 10px; }
.brand-banner-left { flex: 0 0 auto; }
.brand-banner-left a { display: block; }
.brand-banner-logo { display: block; width: auto; max-width: 150px; height: 56px; padding: 10px; border-radius: 10px; background: var(--surface); object-fit: contain; }
.brand-banner-middle { min-width: 0; flex: 1 1 auto; }
.brand-banner-middle h1 { margin: 0; color: var(--surface); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.brand-banner-middle h1 em { font-style: italic; }
.brand-banner-middle p { margin: 4px 0 0; color: var(--surface); font-size: 0.875rem; font-weight: 400; }
.brand-banner-right { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 0.5rem; color: var(--surface); }
.brand-banner-learn { color: var(--surface); font-size: 14px; font-weight: 450; }
.brand-banner-learn a { color: var(--surface); font-weight: 600; text-decoration: underline; }

.button { display: inline-block; min-height: 42px; padding: 12px 18px; border: 1px solid var(--accent); border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 32, 0.04); color: var(--accent); cursor: pointer; font-size: 16px; font-weight: 600; text-decoration: none; transition: transform 200ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.button:hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: translateY(-1px); }
.button:focus-visible, a:focus-visible { outline: 3px solid rgba(223, 0, 36, 0.22); outline-offset: 3px; }
.brand-banner-button { min-height: 40px; padding: 0.5rem 1.25rem; border-color: transparent; border-radius: 8px; background: var(--surface); color: var(--accent); font-size: 0.875rem; }
.brand-banner-button:hover { border-color: transparent; background: #ffffffd9; color: var(--accent-dark); }

.content-shell { padding-top: 10px; }
.layout { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; margin: 1rem auto 0; }
.card { padding: 1.5rem 2rem; border: 1px solid rgba(15, 23, 32, 0.03); border-right: 3px solid var(--accent); border-left: 3px solid var(--accent); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 36px rgba(15, 23, 32, 0.04); }
.farewell-card { padding: 2rem 1.5rem; text-align: center; }
.farewell-card h2 { max-width: 760px; margin: 1rem auto; color: var(--muted); font-size: 1.75rem; font-weight: 700; line-height: 1.25; }
.farewell-card h2 span { color: var(--accent); }
.farewell-copy { max-width: 820px; margin: 0 auto; color: var(--muted-2); font-size: 1rem; line-height: 1.6; }
.farewell-copy p { margin: 0 auto 0.75rem; }
.farewell-copy p:last-child { margin-bottom: 0; }
.farewell-copy strong { color: var(--muted); }
sup { font-size: 0.62em; }
.centered-action { margin-top: 1.4rem; text-align: center; }
.button-primary { background: #fff; }
.button-primary:hover { background: var(--accent); }

.section-title { display: inline-block; width: auto; margin: 0 0 0.75rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--accent); color: var(--muted); font-size: 1.5rem; font-weight: 700; }
.section-description { max-width: 800px; margin: 0 0 2rem; color: var(--muted-2); font-size: 1rem; line-height: 1.6; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.resource { position: relative; display: flex; min-height: 190px; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.75rem; border: 1px solid rgba(15, 23, 32, 0.06); border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 32, 0.04); text-decoration: none; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.resource:hover { border-color: rgba(223, 0, 36, 0.2); box-shadow: 0 8px 24px rgba(15, 23, 32, 0.12); transform: translateY(-3px); }
.resource-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0; }
.resource-icon { flex-shrink: 0; font-size: 2.5rem; line-height: 1; }
.resource-title { color: var(--muted); font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.resource-description { margin: 0; color: var(--muted-2); font-size: 0.95rem; line-height: 1.7; }
.resource-link-label { margin-top: auto; color: var(--accent); font-size: 0.85rem; font-weight: 700; }

.site-footer { width: 100%; max-width: 1100px; margin: auto auto 0; padding: 16px 36px; }
.footer-grid { display: grid; grid-template-columns: 3fr 1fr 1fr; gap: 2rem; margin-bottom: 16px; padding: 16px 0 10px; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.footer-grid section { display: block; }
.footer-about { display: flex !important; align-items: flex-start; gap: 12px; }
.footer-logo { width: 48px; height: 48px; max-width: 48px; flex: 0 0 48px; padding: 6px; border-radius: 8px; object-fit: contain; }
.footer-grid h2 { margin: 0 0 12px; color: var(--accent); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; line-height: 1.25; text-transform: uppercase; }
.footer-grid p, .footer-grid a { color: var(--muted-2); font-size: 0.875rem; line-height: 1.5; }
.footer-grid p { margin: 0; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { text-decoration: none; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid section:last-child .footer-links a { white-space: nowrap; }
.footer-copyright { margin: 0; color: #8793a0; font-size: 0.75rem; line-height: 1.5; text-align: center; }

.card-animate, .card-animate-delay { animation: fadeInUp 0.6s ease-out both; }
.card-animate-delay { animation-delay: 0.12s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .brand-banner, .content-shell { width: calc(100% - 40px); }
  .brand-banner { margin-top: 20px; }
  .brand-banner-row { align-items: center; padding: 0; }
  .brand-banner-logo { width: auto; max-width: 120px; height: auto; padding: 10px; }
  .brand-banner-middle h1 { font-size: 1.25rem; }
  .brand-banner-middle p, .brand-banner-learn { display: none; }
  .resource-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .brand-banner, .content-shell { width: calc(100% - 24px); }
  .brand-banner { margin-top: 12px; border-radius: 0; }
  .brand-banner-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.65rem; }
  .brand-banner-logo { width: 96px; max-width: 96px; padding: 7px; }
  .brand-banner-middle h1 { overflow: hidden; font-size: 1.05rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  .brand-banner-right { align-items: flex-end; gap: 0; }
  .brand-banner-button { min-height: 34px; padding: 0.35rem 0.65rem; font-size: 0.74rem; }
  .content-shell { padding-top: 0; }
  .card { padding: 1.5rem; }
  .farewell-card { padding: 2rem 1.1rem; }
  .farewell-card h2 { font-size: 1.5rem; }
  .resource { min-height: 0; padding: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1rem; padding: 1rem 0; }
  .footer-about { grid-column: auto; }
  .footer-grid section:last-child .footer-links a { white-space: normal; overflow-wrap: anywhere; }
  .site-footer { padding: 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
