:root {
  color-scheme: light;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  color: #142c44;
  background: #f0f4f6;
  --navy: #102439;
  --ink: #142c44;
  --blue: #135f9f;
  --sea: #d8e9ec;
  --paper: #f0f4f6;
  --white: #fff;
  --edge: #c9d8df;
  --muted: #42596a;
  --sun: #ffdb89;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #b2460a; outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -10rem; z-index: 5; background: white; padding: .75rem; }
.skip:focus { top: 1rem; }
h1, h2, h3, h4, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; line-height: 1.3; }
*[id] { scroll-margin-top: 1rem; }

.masthead, footer { padding: .85rem max(1rem, calc((100% - 76rem)/2)); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: .9rem; background: var(--white); border-bottom: 1px solid var(--edge); }
.masthead a { color: var(--ink); text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: .83rem; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.masthead nav { display: flex; align-items: center; gap: 1.05rem; font-size: .88rem; font-weight: 700; }
.masthead .management-link { display: inline-block; padding: .6rem .9rem; border: 1px solid #adc8d9; border-radius: .35rem; color: #124d79; background: #edf5fa; white-space: nowrap; }
.masthead a:hover { text-decoration: underline; }

.hero { min-height: 27rem; display: grid; grid-template-columns: 1fr 1fr; background: var(--navy); color: #fff; }
.hero-copy { display: grid; gap: 1.25rem; justify-items: start; align-content: center; min-width: 0;
  padding: clamp(2.1rem, 5vw, 5rem) clamp(1.4rem, 4vw, 4.5rem) clamp(2.4rem, 5vw, 5rem) max(1rem, calc((100vw - 76rem)/2)); }
.kicker { font-weight: 800; letter-spacing: .17em; font-size: .7rem; color: var(--blue); }
.hero .kicker { color: #a2d8ef; }
h1 { font: 400 clamp(3.1rem, 7vw, 7rem)/.94 var(--serif); letter-spacing: -.073em; }
h1 em { display: block; font-weight: 400; color: var(--sun); }
.hero-intro { color: #e1edf4; max-width: 28rem; font-size: clamp(1rem, 1.8vw, 1.18rem); text-wrap: pretty; }
.hero-link { display: inline-flex; gap: .85rem; align-items: center; margin-top: .2rem; padding: .62rem .9rem; color: var(--navy); background: var(--sun); font-weight: 750; text-decoration: none; border-radius: .3rem; }
.hero-link:hover { background: #ffe8ac; }
.hero-image { position: relative; width: 100%; height: 100%; min-height: 18rem; overflow: hidden; background: #294660; }
.hero-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 50% 17%; }
.hero-image figcaption { position: absolute; right: .9rem; bottom: .9rem; padding: .35rem .55rem; color: #fff; background: #102439e8; font-size: .75rem; }
body[data-view=period] .hero, body[data-view=admin] .hero { min-height: 0; }
body[data-view=period] .hero-copy, body[data-view=admin] .hero-copy { padding-block: 1.6rem; gap: .35rem; }
body[data-view=period] .hero h1, body[data-view=admin] .hero h1 { font-size: clamp(2rem, 4.4vw, 3.85rem); }
body[data-view=period] .hero h1 em, body[data-view=admin] .hero h1 em { display: inline; }
body[data-view=period] .hero-intro, body[data-view=admin] .hero-intro,
body[data-view=period] .hero-link, body[data-view=admin] .hero-link { display: none; }
body[data-view=period] .hero-image, body[data-view=admin] .hero-image { min-height: 0; }
body[data-view=period] .hero-image img, body[data-view=admin] .hero-image img { object-position: 50% 43%; }

.archive-shell { width: min(76rem, calc(100% - 2rem)); margin: 0 auto; padding-block: clamp(1.75rem, 5vw, 4rem); }
#workspace { min-height: 6rem; }
h2, .period-body > section > h3, .section-heading h3 { font: 400 clamp(1.65rem, 3vw, 2.55rem)/1.12 var(--serif); letter-spacing: -.045em; color: var(--navy); }
h4 { font-size: 1.13rem; line-height: 1.35; }
.section-heading, .period-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .7rem; }
.section-heading { margin-bottom: .95rem; }
.browse-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.timeline { min-width: 0; }
.decades { display: flex; flex-wrap: wrap; gap: .45rem; padding: .75rem 0 1rem; border-top: 1px solid var(--edge); }
.decades .decade { padding: .4rem .65rem; min-height: 2.25rem; background: #e3edf1; color: var(--ink); border: 1px solid transparent; font-size: .88rem; }
.decades .decade[aria-pressed=true] { background: var(--navy); color: #fff; }
.years { display: grid; grid-template-columns: repeat(2,minmax(0, 1fr)); gap: .45rem .7rem; }
.years .year-button { position: relative; text-align: left; padding: .65rem 2rem .65rem .8rem; color: var(--ink); background: #fff; border: 1px solid var(--edge); font-weight: 720; }
.year-button::after { content: "↗"; position: absolute; right: .68rem; color: var(--blue); }
.years .year-button[aria-pressed=true] { background: #dcebf4; border-color: #427da4; }
.years .year-button:hover { border-color: #427da4; }
.panel { background: #fff; border: 1px solid var(--edge); border-radius: .6rem; padding: clamp(1rem, 3vw, 1.65rem); }
.entrance { display: grid; gap: .85rem; box-shadow: 0 8px 24px #1024390a; border-top: .28rem solid #48a4ca; }
.entrance .period-picker { margin-top: .45rem; }
.admin-signin, .management { display: grid; gap: .8rem; }
.admin-signin { max-width: 32rem; }
.admin-signin .button-link, .admin-signin .quiet { justify-self: start; }
.management .section-heading { margin-bottom: 0; }
.management .period-picker { max-width: 22rem; }
.archive { padding-top: .2rem; }
.management + .archive { margin-top: 2rem; }
.period-top { padding: 0 0 1.05rem; border-bottom: 1px solid var(--edge); }
.period-top .kicker { margin-bottom: .35rem; }
.period-top h2 { font-size: clamp(2.15rem, 5vw, 4.5rem); }
.period-body { display: grid; gap: clamp(1.55rem, 4vw, 3.1rem); padding-top: 1.45rem; }
.period-body > section { min-width: 0; }
.period-body > section > h3 { margin-bottom: .8rem; }
.team > label { max-width: 27rem; margin-top: .95rem; }
.group-title { margin: 1rem 0 .55rem; }
.story { border-left: .25rem solid #48a4ca; padding: 1.1rem 1.25rem; background: #e4eff3; }
.prose { line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 76ch; }

.stack, .password-form { display: grid; align-items: start; justify-items: start; gap: .68rem; width: 100%; }
.stack > label, .password-form > label { width: min(30rem, 100%); }
label { display: grid; gap: .3rem; font-weight: 700; font-size: .9rem; }
input, select, textarea, button, .button-link { min-height: 2.65rem; border: 1px solid #809cac; border-radius: .35rem; }
input, select, textarea { padding: .5rem .67rem; min-width: 0; max-width: 100%; color: var(--ink); background: #fff; }
textarea { resize: vertical; }
input[type=file] { font-size: .88rem; }
button, .button-link { padding: .55rem .85rem; background: var(--blue); border-color: transparent; color: #fff; font-weight: 700; cursor: pointer; }
button:hover, .button-link:hover { filter: brightness(.93); }
button:disabled { opacity: .6; cursor: wait; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.secondary, .button-link.secondary { background: #eaf3f8; border: 1px solid #a3bfd0; color: #104d7b; }
.quiet { background: transparent; color: #7b2b25; padding-inline: .33rem; }
.danger { background: #882b22; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
details.editor { margin-top: .68rem; }
details.editor > summary { color: #174e7e; cursor: pointer; font-weight: 750; min-height: 1.9rem; padding-block: .2rem; }
details.panel > summary { min-height: 0; }
details.editor[open] > :not(summary) { margin-top: .8rem; }
.empty { color: var(--muted); border: 1px dashed #acbfc7; border-radius: .42rem; padding: .85rem; margin-top: .65rem; }
.people-grid, .album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); gap: .85rem; }
.president-grid { grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); }
.person, .album-grid figure { background: white; border: 1px solid var(--edge); border-radius: .48rem; overflow: hidden; }
.president-grid .person { border: 1px solid #88a9bd; }
.portrait { display: grid; place-items: center; aspect-ratio: 4/3; background: #dcebf3; color: #1b537d; font: 400 2.4rem/1 var(--serif); }
.president-grid .portrait { background: var(--navy); color: var(--sun); }
.portrait img, .album-grid img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.person-info { padding: .88rem; display: grid; gap: .25rem; min-width: 0; }
.person-info h4, .person-role { overflow-wrap: anywhere; }
.person-role { color: #13517d; font-size: .8rem; font-weight: 800; }
.person-info .muted { font-size: .85rem; }
.album-grid { margin-top: .9rem; }
.album-grid figcaption { padding: .55rem .8rem; overflow-wrap: anywhere; }
.album-grid .quiet { margin-left: .45rem; }
.memory { background: #fff; border: 1px solid var(--edge); border-radius: .45rem; margin-top: .85rem; padding: 1rem; }
.memory > * + * { margin-top: .5rem; }
.review { padding: .22rem .5rem; background: #fff2cc; color: #624412; font-size: .82rem; }
.muted { color: var(--muted); }
.confirm { max-width: min(27rem, calc(100% - 2rem)); padding: 1.2rem; border: 1px solid #9bbbcd; border-radius: .5rem; color: var(--ink); }
.confirm .actions { justify-content: end; margin-top: 1rem; }
.confirm::backdrop { background: #10243991; }

#status { position: fixed; z-index: 4; left: 50%; bottom: .8rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); padding: .6rem .9rem; background: #fff; border: 1px solid var(--edge); border-radius: .45rem; box-shadow: 0 5px 22px #10243926; }
#status:empty { display: none; }
#status.error { color: #8e2e24; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .85rem 1.2rem; align-items: start; background: #e2ebee; color: var(--muted); border-top: 1px solid var(--edge); font-size: .9rem; }
footer strong { color: var(--ink); }
footer nav { display: flex; flex-wrap: wrap; gap: .55rem 1rem; }
footer small { flex-basis: 100%; }
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 1.8rem 1rem 1.45rem; gap: .9rem; }
  .hero-image { min-height: clamp(13rem, 52vw, 22rem); }
  body[data-view=period] .hero-image, body[data-view=admin] .hero-image { display: none; }
  .archive-shell { padding-top: 1.45rem; }
  .browse-grid { grid-template-columns: 1fr; }
  .entrance { grid-row: 1; }
  .masthead .nav-periods { display: none; }
  .masthead nav { font-size: .8rem; }
}
@media (max-width: 340px) {
  .brand { font-size: .74rem; letter-spacing: .06em; gap: .3rem; }
  .brand img { width: 28px; height: 28px; }
  .years { grid-template-columns: 1fr; }
}
