.af-portal,
.af-print {
  --af-teal: #008285;
  --af-ink: #172f30;
  --af-cream: #f7f4ea;
  --af-pale: #e5f1ef;
  --af-paper: #fffefa;
  --af-line: #c8d9d5;
  --af-orange: #ff5a1f;
  color: var(--af-ink);
}
.af-portal {
  background: var(--af-cream);
  padding: clamp(12px, 3vw, 24px);
  margin-block: 1.5rem;
  border-radius: 14px;
}
.af-hero {
  background: var(--af-teal);
  color: #fff;
  border-radius: 10px;
  padding: clamp(20px, 4vw, 36px);
  margin-bottom: 1.3rem;
}
.af-hero p { margin: 0 0 .55rem; font-size: .9rem; }
.af-hero h2, .af-heading h3, .af-report h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}
.af-hero h2 { color: inherit; font-size: clamp(2.2rem, 5vw, 3.75rem); }
.af-hero span { display: block; margin-top: .7rem; }
.af-hero span::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: .65rem;
  border-radius: 2px;
  background: var(--af-orange);
}
.af-card, .af-shared-card {
  background: var(--af-paper);
  border: 1px solid var(--af-line);
  border-radius: 12px;
  padding: clamp(14px, 2.5vw, 24px);
}
.af-shared-card { background: var(--af-pale); margin-bottom: 1rem; }
.af-shared-card h3 { font: 1.45rem Georgia, serif; margin: 0 0 .65rem; }
.af-shared-card p:last-child { margin-bottom: 0; }
.af-children, .af-years, .af-print-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1rem;
}
.af-portal .af-button, .af-print .af-button {
  display: inline-block;
  background: var(--af-paper);
  border: 1px solid var(--af-line);
  border-radius: 8px;
  color: var(--af-ink);
  padding: .55rem .75rem;
  font: 600 .9rem/1.35 system-ui, sans-serif;
  text-decoration: none;
}
.af-portal .af-button:hover, .af-print .af-button:hover,
.af-portal .af-button[aria-current="page"], .af-print .af-button[aria-current="page"] {
  background: var(--af-pale);
  border-color: var(--af-teal);
}
.af-print .af-primary { background: var(--af-ink); color: white; cursor: pointer; }
.af-print .af-primary:hover { background: var(--af-teal); }
.af-portal a:focus-visible, .af-portal summary:focus-visible, .af-print :focus-visible { outline: 3px solid var(--af-teal); outline-offset: 3px; }
.af-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: flex-end;
  border-bottom: 1px solid var(--af-line);
  padding-bottom: .9rem;
}
.af-heading p { margin: 0 0 .25rem; font-size: .95rem; }
.af-heading h3 { font-size: clamp(1.85rem, 3vw, 2.5rem); }
.af-entry {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: .9rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--af-line);
}
.af-entry time {
  display: block;
  align-self: start;
  background: var(--af-pale);
  border-radius: 7px;
  padding: .45rem .2rem;
  text-align: center;
  font: 650 .86rem/1.35 system-ui, sans-serif;
}
.af-entry time span { display: block; font-size: .78rem; font-weight: 450; }
.af-entry h4 { margin: 0 0 .2rem; font: 650 1rem/1.4 system-ui, sans-serif; }
.af-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; }
.af-years, .af-empty, .af-archive-link { margin-top: 1rem; }
.af-portal .af-archive-link { display: inline-block; color: var(--af-ink); text-decoration: underline; text-underline-offset: .2em; }
.af-term { border: 1px solid var(--af-line); border-radius: 7px; margin-block: .75rem; padding: .55rem .7rem; }
.af-term summary { cursor: pointer; font-weight: 650; }
.af-term > p { margin-block: .5rem; }
.af-term .af-entry:last-child { border-bottom: 0; }
.af-print { margin: 0; background: var(--af-cream); font: 16px/1.55 system-ui, sans-serif; }
.af-report { max-width: 50rem; margin: auto; padding: 2rem 1.25rem; }
.af-report h1 { font-size: clamp(2rem, 5vw, 3rem); }
.af-print-actions { gap: .5rem .9rem; padding-bottom: .75rem; border-bottom: 1px solid var(--af-line); }
.af-print-actions a { color: var(--af-ink); }
@media (max-width: 650px) {
  .af-portal .wp-block-columns { flex-wrap: wrap; }
  .af-portal .wp-block-column { flex-basis: 100% !important; }
}
@media print {
  .af-print { background: white; color: black; }
  .af-print-actions { display: none; }
  .af-report { max-width: none; padding: 0; }
  .af-entry { break-inside: avoid; }
  .af-entry time { background: white; }
}
.af-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  margin-block: 0;
}
.af-layout > .wp-block-column { min-width: 0; }
.af-shared-card:has(> p:empty):not(:has(> p:not(:empty), > ul, > ol)) { display: none; }
.af-years select {
  border: 1px solid var(--af-line);
  border-radius: 7px;
  background: var(--af-paper);
  color: var(--af-ink);
  font: inherit;
  padding: .4rem;
}
.af-years .af-button { cursor: pointer; }
@media (max-width: 850px) {
  .af-layout { grid-template-columns: minmax(0, 1fr); }
}

.af-entry .af-note + .af-note { margin-top: .7rem; }
