.poste {
  --accent: #12634f;
  --ink: #132822;
  --muted: #516861;
  --line: #d4e0db;
  --paper: #fff;
  background: #f1f5f2;
  color: var(--ink);
  min-height: 100svh;
  font-family: system-ui, -apple-system, sans-serif;
}

.poste-header { background: #fff; border-color: var(--line); }
.poste-header nav {
  max-width: 83rem;
  justify-content: space-between;
  gap: .65rem 1rem;
  min-height: 4.2rem;
}
.poste-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.25rem;
  font-weight: 790;
  letter-spacing: -.04em;
}
.poste-brand span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: white;
  background: #134d40;
  border-radius: .55rem;
  font-size: .95rem;
  letter-spacing: 0;
}
.poste-nav-links { display: flex; flex-wrap: wrap; gap: .2rem; }
.poste-nav-links a {
  color: var(--muted);
  padding: .42rem .62rem;
  border-radius: .45rem;
  font-size: .9rem;
  font-weight: 620;
}
.poste-nav-links a:hover, .poste-nav-links a[aria-current] {
  background: #e5f0eb;
  color: #124f40;
}
.poste-skip {
  position: absolute;
  top: .5rem;
  left: .5rem;
  transform: translateY(calc(-100% - 1rem));
  z-index: 5;
  padding: .4rem 1rem;
  background: #fff;
}
.poste-skip:focus { transform: none; }

.poste main { max-width: 83rem; padding-top: clamp(1.35rem, 3.2vw, 3rem); }
.poste h1 { margin: 0; font-weight: 760; letter-spacing: -.055em; }
.poste h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }
.poste p { margin: .65rem 0; }
.poste-muted { color: var(--muted); }
.poste button, .poste .button {
  min-height: 2.75rem;
  border-radius: .5rem;
  font-weight: 650;
}
.poste button:hover:not(:disabled), .poste .button:hover { filter: brightness(.93); }
.poste button:disabled { opacity: .56; cursor: default; }
.poste button:focus-visible, .poste a:focus-visible,
.poste input:focus-visible, .poste [tabindex]:focus-visible {
  outline: 3px solid #bd7418;
  outline-offset: 3px;
}
.poste .poste-outline { color: #185442; background: #fff; border-color: #9cb7ad; }
.poste .poste-certificate { color: #603b06; background: #fff4db; border-color: #c99b51; }

.poste-signin {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: stretch;
}
.poste-auth-intro {
  display: grid;
  align-content: end;
  position: relative;
  min-height: 28rem;
  color: #fff;
  background:
    radial-gradient(ellipse at 90% 0%, #276c56 0, transparent 63%),
    repeating-linear-gradient(145deg, transparent 0 3.25rem, #ffffff10 3.25rem 3.3rem),
    #103c32;
  border-radius: 1rem 0 0 1rem;
  padding: clamp(1.5rem, 5vw, 4rem);
}
.poste-auth-intro h1 { max-width: 12ch; font-size: clamp(2.1rem, 5vw, 4rem); }
.poste-auth-intro p { color: #dbece4; margin-bottom: 0; }
.poste-auth-card, .poste-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .85rem;
  padding: clamp(1rem, 2.2vw, 1.8rem);
}
.poste-auth-card {
  display: grid;
  align-content: center;
  padding: clamp(1.4rem, 4vw, 3.5rem);
  border-left: 0;
  border-radius: 0 1rem 1rem 0;
}
.poste-auth-card h2 { margin-bottom: 1.15rem; }
.poste-auth-card label { font-size: .92rem; font-weight: 620; margin-bottom: .9rem; }
.poste input:not([type="checkbox"]) {
  border-color: #9cb7ad;
  border-radius: .45rem;
  min-height: 2.75rem;
  background: #fbfdfb;
}
.poste-auth-card input { margin-top: .3rem; }
.poste-full { width: 100%; }
.poste-alert {
  padding: .65rem .8rem;
  color: #59370c;
  background: #fff2d9;
  border-left: 3px solid #bd7418;
  border-radius: .25rem;
}

.poste-titlebar, .poste-section-heading, .poste-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .85rem;
}
.poste-titlebar { margin-bottom: 1.25rem; }
.poste-reader {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .85rem;
  overflow: hidden;
}
.poste-toolbar { padding: .9rem clamp(.75rem, 2vw, 1.2rem); }
.poste-folder-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
#poste-status { color: var(--muted); font-size: .93rem; margin: 0; }
.poste-view.reader-stage {
  height: clamp(16rem, 58svh, 50rem);
  border-radius: 0;
  margin: 0;
  padding: 0;
  background: #24332e;
}
.poste-view iframe { grid-area: 1/1; border: 0; }
.poste-view iframe:not([src]) { visibility: hidden; }
.poste-no-preview { grid-area: 1/1; color: #d1ded6; font-size: .95rem; }
.poste-view iframe[src] + .poste-no-preview { display: none; }
.poste-decision.reader-decision { border: 0; border-radius: 0; }

.poste-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}
.poste-stat {
  display: grid;
  gap: .2rem;
  background: #fff;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  color: var(--muted);
}
.poste-stat strong { color: var(--ink); font-size: clamp(1.55rem, 3vw, 2.5rem); font-variant-numeric: tabular-nums; }
.poste-stat small { font-size: .65em; font-weight: 550; color: var(--muted); }
.poste-card + .poste-card { margin-top: 1rem; }
.poste-add { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.poste-add label { font-size: .92rem; }
.poste .poste-add input { width: 5.2rem; }
.poste-accounts .scroll { margin-top: .8rem; }
.poste-accounts table { min-width: 34rem; font-variant-numeric: tabular-nums; }
.poste-accounts thead th { background: #e9f0ec; }
.poste-accounts tbody th { background: transparent; font-weight: 650; }
.poste-accounts tbody tr:nth-child(even) { background: #f7faf8; }
.poste-account-state {
  display: inline-block;
  white-space: nowrap;
  padding: .12rem .48rem;
  border-radius: 1rem;
  background: #eef1ee;
  color: #48584e;
  font-size: .85em;
}
.poste-account-state.active { background: #dff1e7; color: #15523c; }
.poste-conflicts { overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .poste-signin { grid-template-columns: 1fr; }
  .poste-auth-intro { min-height: 11rem; border-radius: .85rem .85rem 0 0; }
  .poste-auth-card { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 .85rem .85rem; }
  .poste-stats { grid-template-columns: 1fr; gap: .45rem; }
  .poste-stat { grid-template-columns: 1fr auto; align-items: center; }
  .poste-toolbar { align-items: flex-start; }
  .poste-view.reader-stage { height: clamp(16rem, 52svh, 32rem); }
}

.poste-workbook-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .9rem 0 0;
  padding: .35rem .35rem 0;
  background: #eaf1ed;
  border-radius: .55rem .55rem 0 0;
}
.poste-workbook-tabs a {
  padding: .45rem .8rem;
  border-radius: .35rem .35rem 0 0;
  text-decoration: none;
  font-weight: 650;
}
.poste-workbook-tabs a[aria-current] { background: white; color: #153e32; }
.poste-workbook table { min-width: 28rem; font-variant-numeric: tabular-nums; }
.poste-workbook tbody tr:nth-child(even) { background: #f7faf8; }
.poste-preview-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: .75rem;
}

.poste-admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem .55rem;
  margin: .9rem 0;
}
.poste-admin-search label { grid-column: 1 / -1; margin: 0; font-weight: 620; }
.poste-admin-search a { grid-column: 1 / -1; }
