/* Planning board and archival photographs */
.io-board {
  --sheet: #f5f1e7;
  --rule: #d1cabb;
  --pen: #222e2d;
  color: var(--pen);
  background: var(--sheet);
  padding: clamp(14px, 1.6vw, 26px);
  border-top: 4px solid #d3a457;
  border-radius: 6px;
  box-shadow: 0 7px 28px #0003;
  scroll-margin-block: 12px;
}
.io-board:focus:not(:focus-visible), .io-editor:focus:not(:focus-visible) {outline: none}
.io-icon {display: inline-block; flex: 0 0 auto; vertical-align: middle}
.io-sr {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap}
.io-heading h2, .sector-dossiers-title, .archive-gallery-head h2 {
  font: 550 clamp(27px, 3vw, 40px)/1.1 'Barlow Condensed', Arial, sans-serif;
  letter-spacing: -.018em; margin: 0;
}
.io-heading p {font-size: 15px; margin: 6px 0 16px; color:#435251; max-width: 85ch}
.io-heading {display:flex; align-items:baseline; justify-content:space-between; gap:6px 15px; flex-wrap:wrap}
.game-shell .io-guide {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 15px;
  padding: 9px 13px; background: #e7e0c9; border-left: 3px solid #89723a;
  margin-bottom: 14px; border-radius: 2px;
}
.io-guide-number {color: #63501e; font-weight:700; font-size:13px; white-space:nowrap}
.io-guide-copy {flex:1 1 200px; min-width:0}
.io-guide details {padding:0; background:transparent; margin:0; border:0}
.io-guide summary {color: #242e2b; font-size:15px}
.io-guide p {font-size:15px; line-height:1.45; margin:7px 0 0}
.io-guide .io-alternatives {color:#384538; font-size:14px; margin:3px 0 0}
.io-guide-buttons {display:flex; flex-wrap:wrap; gap:7px; align-items:center}
.game-shell .io-guide-buttons button, .game-shell .io-pager button {
  border:1px solid #a99b78; background:#fcf8eb; color:#3f4137;
  line-height:1.2; font-size:13px; padding:6px 11px; min-height:34px;
}
.game-shell .io-guide-buttons button:last-child {background:#34463f; color:white; border-color:#34463f}
.io-layout {display:grid; grid-template-columns:minmax(0,1fr) clamp(250px,23vw,330px); gap:16px; align-items:start}
.io-sheet {min-width:0}
.io-table {width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; font-variant-numeric:tabular-nums}
.io-classification {font:14px/1.4 'PT Sans',sans-serif; color:#554c3b; margin:8px 0 12px; max-width:100ch}
.io-flow-kind {display:block; margin:2px 0 6px; color:#6d624d; font:13px/1.25 'PT Sans',sans-serif}
.io-table th, .io-table td {padding:0; vertical-align:middle; text-align:center; border:0; background:none}
.io-table thead th {
  height:58px; background:#263834; color:#faf7ea;
  font-size:clamp(11px,1.03vw,14px); font-weight:700; line-height:1.3;
  border-right:1px solid #43544c;
}
.io-table thead th:first-child {width:clamp(98px,9vw,134px); border-radius:4px 0 0 0}
.io-table thead th:last-child {width:clamp(48px,4.5vw,67px); border-radius:0 4px 0 0; border-right:0}
.io-table thead th span:not(.io-sector-icon), .io-table tfoot th span {color:#d9b56f}
.io-sector-icon {display:block; color:#e5c993; margin:0 auto 4px}
.io-sector-icon .io-icon {width:20px; height:20px}
.io-table tbody :is(th,td) {border-right:1px solid var(--rule); border-bottom:1px solid var(--rule); background:#fffdf6}
.io-table tbody th {border-left:1px solid var(--rule); padding:6px 7px; background:#eae7dc; text-align:left}
.io-row-title {display:flex; flex-wrap:wrap; align-items:center; gap:5px; color:#293d36; font-weight:700; line-height:1.25; font-size:clamp(12px,1.1vw,16px)}
.io-row-title .io-icon {width:21px; height:21px}
.io-row-food .io-row-title .io-icon {color:#8a621b}
.io-row-fuel .io-row-title .io-icon {color:#a04628}
.io-row-materials .io-row-title .io-icon {color:#47636f}
.io-row-goods .io-row-title .io-icon {color:#4f6f56}
.io-table tbody th>small {display:block; color:#526059; margin-top:5px; font-size:11px; font-weight:400; line-height:1.2}
.game-shell button.io-cell {
  position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  width:100%; min-height:72px; border:0; border-radius:0; padding:7px 2px;
  line-height:1.2; color:var(--pen); background:#fffdf6; white-space:normal;
  transition:box-shadow 100ms ease, background 100ms ease;
}
.io-cell .io-amount {font:600 clamp(19px,1.7vw,25px)/1.05 'Barlow Condensed',Arial,sans-serif; color:inherit}
.io-amount small {font:500 12px/1 'PT Sans',Arial,sans-serif; color:inherit; opacity:.86}
.io-cell .io-state {font-size:10.5px; line-height:1.2; font-weight:700}
.io-board .io-cell.io-short {color:#813522; background:#f5d6c9}
.io-board .io-cell.io-potential {color:#725720; background:#f3e8c8}
.io-board .io-cell.io-met, .io-board .io-cell.io-extra {color:#295e49; background:#dcebdc}
.io-board .io-cell.io-optional {color:#50625c; background:#faf8ee}
.io-meter {width:58%; height:3px; max-width:42px; border-radius:2px; margin-top:2px; background:#0002; overflow:hidden}
.io-meter i {display:block; height:100%; background:currentColor}
.io-table .io-active-axis {background:#405b4e; box-shadow:inset 0 -3px #e2bb72}
.io-table tbody th.io-active-row {box-shadow:inset 3px 0 #825e25}
.io-delta {display:inline-block; font:700 10px/1.2 'PT Sans',sans-serif; background:#f8e1a5; color:#3c341f; border-radius:2px; margin:3px 0 0; padding:1px 4px; white-space:nowrap}
.io-inline {display:none}
.game-shell .io-cell:hover {box-shadow:inset 0 0 0 2px #7c8877}
.game-shell .io-cell[aria-pressed="true"] {box-shadow:inset 0 0 0 3px #273e3a}
.io-board button:focus-visible, .io-board summary:focus-visible {outline:3px solid #165d9c; outline-offset:-3px; z-index:1}
.io-table tbody .io-na {color:#a4a695; background:repeating-linear-gradient(135deg,#edeae0 0 4px,#f3f0e6 4px 8px)}
.io-table tbody .io-balance {background:#deeadb; color:#234e39}
.io-balance strong, .io-table tfoot strong {display:block; font:600 22px/1.1 'Barlow Condensed',Arial,sans-serif}
.io-balance small, .io-table tfoot small {display:block; font:600 11px/1.2 'PT Sans',Arial,sans-serif; margin-top:3px}
.io-table tbody .io-balance.over {color:#793020; background:#f6d5c8}
.io-table tfoot th, .io-table tfoot td {height:55px; background:#2c403c; color:#fff9e6; border-right:1px solid #475a51}
.io-table tfoot th {text-align:left; padding-left:10px; border-radius:0 0 0 4px; font-size:14px}
.io-table tfoot td:last-child {border-radius:0 0 4px 0; border:0}
.io-table tfoot strong {font-size:20px}
.io-table tfoot small {color:#dee6d8; font-weight:400; font-size:10.5px}
.io-key, .io-totals {display:flex; flex-wrap:wrap; gap:5px 16px; align-items:center}
.io-key {margin:10px 0 13px; color:#4d554c; font-size:12px}
.io-key b {font-weight:700; margin-right:1px}
.key-hunger {color:#8b3a26}.key-met {color:#276346}.key-room {color:#725720}
.io-totals {border-block:1px solid var(--rule); padding:8px 0; font-size:13px}
.io-totals span {display:inline-flex; gap:5px; align-items:center}
.io-totals .io-icon {color:#53675a; width:19px; height:19px}
.game-shell .io-accounting {background:transparent; margin:0; border:0; padding:8px 0 0}
.io-accounting summary {font-size:13px; color:#4d5e52}
.io-accounting p, .io-accounting ul {font-size:14px; line-height:1.5; color:#435048}
.io-accounting ul {margin:8px 0; padding-inline-start:22px}
.io-editor {
  background:#fffdf6; border:1px solid #c2c5b4; border-radius:5px; overflow:hidden;
  scroll-margin-top:12px; outline-offset:2px;
}
.io-editor-body {padding:12px 15px 14px}
.io-editor h3 {font:550 23px/1.14 'Barlow Condensed',Arial,sans-serif; color:#253d35; text-transform:none; letter-spacing:-.01em; margin:0 0 10px}
.io-editor h3 span {color:#8c7041}
.io-policy {display:flex; gap:4px; margin-top:10px}
.game-shell .io-policy button {flex:1; border-color:#babbaa; background:#f4f2e8; color:#405246; min-height:36px; padding:5px; font-size:13px}
.game-shell .io-policy [aria-pressed="true"] {background:#355343; color:#fff; border-color:#355343}
.io-control {display:flex; gap:7px; align-items:center; justify-content:space-between; margin:12px 0}
.io-control>span {font-size:14px; font-weight:700; line-height:1.25}
.io-stepper {display:flex; align-items:stretch; border:1px solid #a9ad9e; border-radius:4px; overflow:hidden; flex:none}
.game-shell .io-stepper button {width:38px; min-height:40px; padding:0; border:0; border-radius:0; background:#eeeade; color:#254036; font:700 22px/1 sans-serif}
.game-shell .io-stepper button:last-child {background:#a4402c; color:#fff}
.io-stepper output {min-width:32px; display:grid; place-items:center; font:600 22px/1 'Barlow Condensed',Arial,sans-serif; color:#263b31}
.io-editor-links {display:flex; flex-wrap:wrap; gap:10px; justify-content:space-between; border-top:1px solid #d6d7c8; margin-top:13px; padding-top:6px}
.game-shell .io-editor-links button, .game-shell .io-source-link {
  background:none; border:0; padding:4px 0; min-height:32px; font-size:13px; color:#375c4a; text-decoration:underline; text-underline-offset:3px;
}
.game-shell .io-source-link {text-align:left; font-weight:700; color:#85452b}
.game-shell .io-other-needs {margin:10px 0 0; padding:0; background:none; border:0}
.io-other-needs>summary {font:700 13px/1.3 'PT Sans',sans-serif; color:#374b3d; letter-spacing:0; text-transform:none}
.io-other-needs>div {display:flex; flex-wrap:wrap; gap:5px; margin-top:4px}
.game-shell .io-other-needs button {display:inline-flex; justify-content:center; align-items:center; gap:3px; min-height:30px; padding:4px 7px; background:#f0eadc; border-color:#c8c9b7; color:#4b493b; font-size:12px}
.io-other-needs .io-icon {width:15px; height:15px}
.io-other-needs b {margin-left:2px}
.io-back-table, .io-pager {display:none}
.io-changes, .io-warning {font-size:12px; background:#eaf1e4; padding:8px 10px; border-left:3px solid #669165; margin:10px 0}
.io-changes ul {list-style:none; padding:0; margin:3px 0 0}
.io-changes li {display:flex; justify-content:space-between; flex-wrap:wrap; column-gap:6px; line-height:1.5}
.io-changes li span {white-space:nowrap; font-variant-numeric:tabular-nums}
.game-shell .io-effect-details {padding:0; margin:5px 0 0; background:none; border:0}
.io-effect-details summary {font:13px/1.3 'PT Sans',sans-serif; color:#42594b; text-transform:none; letter-spacing:0}
.io-warning {color:#6f3426; background:#f8e8d9; border-color:#a95b42; font-size:14px}
.game-shell details.dossier-workspace {padding:12px 0 0; margin:24px 0 0; border-top:1px solid #61706a; scroll-margin-top:12px}
.game-shell .sector-dossiers-title {font:550 26px/1.15 'Barlow Condensed',Arial,sans-serif; letter-spacing:0; color:#f1ebdb; margin:0; text-transform:none; cursor:pointer}
.dossier-workspace[open]>.sector-dossiers-title {margin-bottom:14px}
.game-shell .sector-nav button {display:flex; align-items:center; gap:8px}
.sector-nav .io-icon {width:18px; height:18px; color:#ddc290}
.game-shell .back-exchanges {color:#ebdfc2; background:none; border-color:#687873; padding:4px 9px; font-size:13px; min-height:34px}
.back-exchanges .io-icon {width:17px; height:17px}
.game-shell .to-sectors {color:#eaeadf; background:transparent; border-color:#657570}
.archive-gallery {max-width:1200px; margin:0 auto; padding:0 24px}
.hero-archives {position:absolute; z-index:1; right:max(4.5%,calc((100vw - 1220px)/2)); top:19%; width:clamp(232px,25vw,360px); display:grid; gap:0}
.hero-archives figure {margin:0; padding:7px 7px 2px; background:#e4ddcb; color:#27332c; box-shadow:0 8px 26px #0009}
.hero-archives figure:first-child {margin-right:30px; transform:rotate(-4deg)}
.hero-archives figure:last-child {margin-left:40px; margin-top:-2px; transform:rotate(3deg)}
.hero-archives .archive-zoom {height:clamp(105px,10vw,155px)}
.hero-archives figcaption {font:500 12px/1.25 'PT Sans',sans-serif; margin:5px 2px 6px}
.hero-archives figcaption a {color:#28362d; text-decoration:none}
.hero-archives .zoom-mark {font-size:13px}
.archive-gallery-head {display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:14px; margin:30px 0 18px}
.archive-gallery-head h2 {font-size:34px}
.archive-prints {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px}
.archive-print {margin:0; background:#1d292c; border:1px solid #394a4d; border-radius:4px; overflow:hidden}
.archive-print figcaption {padding:9px 11px; font-size:13px; line-height:1.35}
.archive-print a {color:#e3d8bc; text-decoration:none}
.archive-print a:hover {text-decoration:underline}
.archive-zoom, .game-shell button.archive-zoom {display:block; width:100%; height:100%; position:relative; border:0; border-radius:0; padding:0; margin:0; background:#26332f; cursor:zoom-in; overflow:hidden}
.archive-print .archive-zoom {height:clamp(135px,15vw,210px)}
.archive-zoom img {width:100%; height:100%; display:block; object-fit:cover}
.game-shell .sector-photo img, .io-photo img {filter:none; opacity:1}
.zoom-mark {position:absolute; top:7px; right:8px; background:#17221bc4; color:#fff; font-size:18px; line-height:1; padding:3px 5px; border-radius:2px}
.io-photo {position:relative; height:104px; margin:0}
.io-photo figcaption {position:absolute; inset:auto 0 0; padding:12px 9px 4px; background:linear-gradient(transparent,#111c18eb); line-height:1.15; font-size:10px; pointer-events:none}
.io-photo figcaption a {color:white; text-decoration:none; pointer-events:auto}
#photo-dialog {
  width:min(880px,calc(100% - 32px)); max-height:92dvh; overflow-y:auto; padding:16px 20px 18px;
  background:#1a2426; color:#f9f5e9; border:1px solid #78877d; border-radius:7px; box-shadow:0 10px 70px #000b;
}
#photo-dialog::backdrop {background:#081015e8}
.photo-controls, .photo-turn {display:flex; align-items:center; justify-content:space-between; gap:12px}
.photo-controls {font-size:13px; margin-bottom:9px; color:#dbcaac}
#photo-dialog button {min-height:38px; padding:6px 11px; background:#293b38; color:#fff; border:1px solid #718278; border-radius:4px; cursor:pointer}
#photo-dialog .photo-full {display:block; width:100%; height:min(53dvh,530px); object-fit:contain; object-position:center!important; background:#101717}
#photo-dialog h2 {margin:14px 0 3px; font:500 22px/1.25 'Barlow Condensed',sans-serif}
#photo-dialog p {margin:0 0 12px; font-size:14px; color:#c7d1c9}
#photo-dialog a {color:#e8c98c}
@media(max-width:1099px) {
  .hero-archives {position:static; width:100%; display:flex; gap:10px; margin:16px auto 6px; max-width:570px}
  .hero-archives figure:first-child,.hero-archives figure:last-child {margin:0; transform:none; flex:1; min-width:0}
  .landing-hero:has(.hero-archives) {flex-direction:column; justify-content:center; align-items:start}
  .hero-archives .archive-zoom {height:110px}
  .io-inline {display:table-row}
  .io-table .io-inline>td {text-align:left; background:#e6ecdf; border:1px solid #adb9a8; border-top:0}
  .io-inline-edit {padding:7px 12px}
  .io-inline-head {display:flex; align-items:center; justify-content:space-between; line-height:1.25}
  .io-inline-head strong {font-size:13px; color:#2b493a}
  .game-shell .io-inline-head button {min-height:29px; padding:3px 0; background:none; border:0; color:#365b49; font-size:12px; text-decoration:underline}
  .io-inline .io-control {margin:4px 0}
  .io-inline .io-policy {margin-top:3px; max-width:285px}
  .io-inline .io-control>span {padding-right:4px}
  .io-inline .io-warning {margin:5px 0}
  .io-layout {grid-template-columns:minmax(0,1fr)}
  .io-editor {display:none}
  .io-back-table {display:block}
}
@media(max-width:760px) {
  .io-heading {display:block}.io-heading p {margin-bottom:4px}
  .io-board {padding:12px 9px; border-radius:4px}
  .io-heading h2 {font-size:28px}.io-heading p {font-size:14px; line-height:1.35; margin-bottom:12px}
  .game-shell .io-guide {gap:4px 9px; padding:7px 9px; margin-bottom:8px}
  .io-guide-copy {flex-basis:150px}.io-guide summary {font-size:14px}
  .io-guide-buttons {margin-left:auto}
  .io-pager {display:flex; align-items:center; justify-content:space-between; gap:6px; padding:0 0 7px}
  .io-pager strong {font-size:14px; color:#354a40}
  .io-pager small {color:#657365; font-weight:400; margin-left:4px}
  .io-table [data-page] {display:none}
  .io-table[data-visible-page="0"] [data-page="0"], .io-table[data-visible-page="1"] [data-page="1"],
  .io-table[data-visible-page="2"] [data-page="2"], .io-table[data-visible-page="3"] [data-page="3"] {display:table-cell}
  .io-table thead th {font-size:12px; height:49px}.io-table thead th:first-child {width:30%}.io-table thead th:last-child {width:16%}
  .io-table tbody th {padding:4px}.io-row-title {font-size:12px; gap:3px}
  .io-row-title .io-icon {width:16px; height:16px}.io-table tbody th>small {font-size:10px}
  .game-shell button.io-cell {min-height:59px}.io-amount small {font-size:12px}
  .io-table tfoot th, .io-table tfoot td {height:47px}.io-balance strong {font-size:20px}
  .io-key {gap:4px 9px; margin:8px 0; font-size:11px; line-height:1.35}
  .io-totals {gap:3px 10px; font-size:12px}.io-layout {gap:10px}
  .io-policy button {min-height:42px}
  .game-shell .io-stepper button {width:44px; min-height:44px}
  .io-stepper output {min-width:40px}.io-control {margin:11px 0}
  .game-header-actions .to-sectors {display:none}.game-shell .sector-dossiers-title {font-size:24px}
  .game-shell .back-exchanges {font-size:11px; padding:3px 5px}.back-exchanges .io-icon {display:none}
  .resource-strip {column-gap:5px}.resource-strip>span {font-size:10px}.resource-strip b {font-size:18px}
  .archive-gallery {padding:0 16px}.archive-prints {grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px}
  .archive-gallery-head h2 {font-size:28px}.archive-print .archive-zoom {height:105px}
  #photo-dialog {padding:12px; width:calc(100% - 16px)}
}
@media(prefers-reduced-motion:reduce){.game-shell button.io-cell{transition:none}}
