:root {
  color-scheme: light;
  --ink: #172e2a;
  --muted: #526861;
  --deep: #103731;
  --accent: #00694f;
  --pale: #eef6ee;
  --mint: #bcdfbf;
  --rule: #d7dfd9;
  --paper: #f3f5f1;
  --white: #fff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem,4vw,3rem); letter-spacing: -.055em; font-weight: 650; }
h2 { font-size: 1.23rem; font-weight: 650; letter-spacing: -.032em; }
button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"], input[type="radio"] { cursor: pointer; }
:focus-visible { outline: 3px solid #e5952e; outline-offset: 3px; }
button { line-height: 1.25; }
button:disabled, input:disabled, select:disabled, fieldset:disabled label { cursor: not-allowed; }
button:disabled { opacity: .48; }
.mono, .code-key, .serial { font-family: "IBM Plex Mono", Consolas, monospace; }
.skip { position: fixed; top: -100px; z-index: 20; left: 1rem; padding: .6rem 1rem; color: var(--deep); background: #fff; }
.skip:focus { top: .7rem; }
.brand { display: inline-flex; gap: .75rem; align-items: center; color: #fff; font-family: "Barlow Semi Condensed", Inter, "Segoe UI", sans-serif; font-size: 1.52rem; line-height: 1; letter-spacing: -.045em; font-weight: 400; }
.brand strong { font-weight: 700; }
.brandmark { display: grid; width: 2rem; height: 2rem; align-content: center; justify-items: start; gap: 3px; padding: 0 6px; background: #bfdcc0; border-radius: 6px; }
.brandmark i { display: block; height: 3px; width: 100%; background: var(--deep); transform: skewY(-15deg); }
.brandmark i:nth-child(2) { width: 74%; }
.brandmark i:nth-child(3) { width: 45%; }

.login-layout { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); min-height: 100vh; min-height: 100svh; background: #f7f8f3; }
.login-cover { isolation: isolate; overflow: hidden; position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: clamp(2rem,4.6vw,5rem); background: var(--deep); color: #fff; }
.cover-image { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg,rgba(8,33,28,.74) 0%,rgba(7,35,28,.13) 25%,rgba(6,29,25,.08) 49%,rgba(7,29,24,.87) 100%), url("/board.jpg") 53% 46% / cover; }
.login-cover h1 { font-size: clamp(3rem,5.9vw,6.65rem); letter-spacing: -.065em; line-height: .96; font-weight: 650; margin: 6rem 0 .11em; }
.terminal-dot { color: #e8ad64; }
.login-side { display: grid; align-items: center; justify-items: center; padding: 3.5rem clamp(1.6rem,6.6vw,8rem); }
.login-panel { width: min(100%,25.5rem); }
.login-panel h2 { font-size: clamp(2rem,3.8vw,3.6rem); letter-spacing: -.058em; line-height: 1.03; }
.login-panel > p { color: var(--muted); font-size: 1rem; margin-top: 1rem; max-width: 22rem; }
.login-panel .primary { width: 100%; margin-top: 1.8rem; min-height: 3.1rem; text-decoration: none; }
.login-panel .alert { margin: 1rem 0 0; }
label, legend { font-weight: 580; font-size: .9rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  display: block; width: 100%; color: var(--ink); background: #fff; border: 1px solid #adbbb3;
  border-radius: 6px; padding: .65rem .82rem; min-height: 2.72rem; line-height: 1.35;
}
input[readonly]:not([type="file"]) { background-color: #f4f6f2 !important; color: #53675c !important; }
input::placeholder, textarea::placeholder { color: #65756a; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 2.1rem; background-image: linear-gradient(45deg, transparent 50%, #43554a 50%), linear-gradient(135deg,#43554a 50%,transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
select:disabled { background-color: #f3f5f1; }
.primary, .secondary, .signout { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; min-height: 2.65rem; padding: .63rem 1.12rem; border: 1px solid transparent; font-size: .94rem; font-weight: 650; }
.primary { color: #fff; background: var(--accent); }
.primary:hover:not(:disabled) { background: #00523e; }
.secondary { color: var(--deep); background: #fff; border-color: #b1bdb5; }
.secondary:hover:enabled { background: #f0f5ef; border-color: #859b8c; }
.small { min-height: 2.3rem; padding: .35rem .75rem; font-size: .88rem; }
.text-btn { border: 0; background: none; color: var(--accent); padding: .4rem; font-size: .86rem; font-weight: 650; }
.text-btn:hover { text-decoration: underline; }
.masthead { color: #fff; background: var(--deep); }
.mast-inner, .workspace { max-width: 84rem; margin-inline: auto; padding-inline: clamp(1rem,4vw,4rem); }
.mast-inner { display: flex; align-items: stretch; gap: clamp(1.2rem,5vw,5rem); min-height: 4.55rem; }
.tabs { align-self: stretch; display: flex; align-items: stretch; gap: 1.5rem; }
.tab { display: inline-flex; gap: .5rem; align-items: center; padding: .3rem .1rem 0; border: 0; border-bottom: 3px solid transparent; color: #c3d6c9; background: none; font-weight: 550; font-size: .95rem; }
.tab.active { color: #fff; border-bottom-color: #c0dfac; }
.tab:hover { color: #fff; }
.nav-icon { display: inline-block; width: .9rem; height: .9rem; opacity: .83; }
.tiles { background: linear-gradient(currentColor,currentColor) left top/39% 39%, linear-gradient(currentColor,currentColor) right top/39% 39%, linear-gradient(currentColor,currentColor) left bottom/39% 39%, linear-gradient(currentColor,currentColor) right bottom/39% 39%; background-repeat: no-repeat; }
.lines { border: 1px solid currentColor; border-radius: 1px; background: repeating-linear-gradient(to bottom,transparent 0 2px,currentColor 2px 3px) center / 58% 65% no-repeat; }
.account { display: flex; align-items: center; margin-left: auto; gap: 1rem; min-width: 0; }
.account-name { font-size: .9rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 12rem; }
.signout { background: none; border-color: #6a8980; min-height: 2.1rem; padding: .32rem .72rem; font-weight: 500; color: #e9f1e8; }
.signout:hover { background: #214841; }
.workspace { padding-block: clamp(1.4rem,3vw,3rem) 4rem; }
.page-heading, .section-top, .field-top, .job-line { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.page-heading { margin-bottom: clamp(1.2rem,2.4vw,2rem); }
.workspace-grid { display: grid; align-items: start; grid-template-columns: minmax(0,1.75fr) minmax(17rem,1fr); gap: 1.25rem; }
.field-stack, .key-field { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.field-stack, .aside, .new-version { display: grid; gap: 1rem; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: clamp(1.05rem,2.1vw,1.55rem); }
.panel h2 { margin-bottom: 1.15rem; }
.section-top h2 { margin-bottom: 0; }
.section-top { margin-bottom: 1rem; }
.count { display: inline-grid; place-items: center; min-width: 1.65rem; padding: .05rem .32rem; background: #edf2eb; line-height: 1.5; font-size: .85rem; font-variant-numeric: tabular-nums; border-radius: 4px; color: #3a5545; }
.two-col, .file-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .95rem; }
.field { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.optional, .code-key { margin-left: .3rem; font-size: .78rem; color: var(--muted); font-weight: 400; }
.new-version { padding-top: 1.1rem; }
.format-hint, .subtext { color: var(--muted); font-size: .875rem; }
.format-hint:empty { display: none; }
.file-box { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: .85rem; align-items: center; padding: 1rem; border: 1px dashed #a3b6a8; background: #fafcf8; border-radius: 7px; cursor: pointer; }
.file-box:focus-within { outline: 3px solid #e5952e; outline-offset: 2px; }
.file-box:hover, .file-box.dragover { background: #edf6ed; border-color: var(--accent); }
.file-box.chosen { border-style: solid; background: #f0f6ee; }
.file-box input, .segmented input { width: 1px; height: 1px; position: absolute; overflow: hidden; clip-path: inset(50%); }
.file-icon { grid-row: span 2; position: relative; width: 1.5rem; height: 1.9rem; border: 1.5px solid #5b7f68; background: #edf5e9; border-radius: 3px; }
.file-icon::after { content: ''; position: absolute; bottom: .4rem; left: .28rem; width: .7rem; height: 4px; border-block: 1px solid #5b7f68; }
.file-title { font-weight: 650; }
.file-value { color: var(--accent); font-weight: 520; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check { display: inline-flex; gap: .5rem; align-items: start; font-size: .9rem; font-weight: 450; line-height: 1.35; }
.check input { width: 1rem; height: 1rem; margin: .1rem 0 0; flex: none; accent-color: var(--accent); }
.check.compact { font-size: .79rem; align-items: center; gap: .32rem; color: var(--muted); }
.compact input { width: .87rem; height: .87rem; margin: 0; }
.key-field { margin-top: 1rem; }
.format-field { margin-bottom: 1rem; }
.key-field legend { padding: 0; margin-bottom: .45rem; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid #d5ded5; border-radius: 7px; background: #eff3ed; }
.segmented label { cursor: pointer; }
.segmented span { display: block; padding: .3rem .9rem; border-radius: 4px; font-size: .85rem; font-weight: 550; color: var(--muted); }
.segmented input:checked + span { background: #fff; color: var(--deep); box-shadow: 0 1px 3px #162c1d26; }
.segmented input:focus-visible + span { outline: 2px solid #e5952e; }
.publish-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.publish-actions .primary { flex-shrink: 0; }
.empty { color: var(--muted); font-size: .94rem; line-height: 1.58; padding: .6rem 0 .15rem; }
.history-row { display: grid; gap: .3rem; width: 100%; border: 0; border-top: 1px solid #e1e6e1; padding: .9rem .2rem; background: transparent; text-align: left; color: var(--ink); }
.history-row:hover, .history-row.selected { background: #f1f6ef; }
.history-row strong { font-size: .98rem; letter-spacing: -.013em; overflow-wrap: anywhere; }
.row-top { display: flex; align-items: start; justify-content: space-between; gap: .5rem; }
.row-date, .row-meta { color: var(--muted); font-size: .81rem; }
.status { flex-shrink: 0; max-width: 55%; border-radius: 4px; background: #edf1ed; color: #3e5548; padding: .22rem .45rem; font-size: .76rem; font-weight: 620; text-align: center; }
.status.success { background: #e2f1e1; color: #255635; }
.status.error { background: #fff0e6; color: #843e18; }
.status.running { background: #e0efed; color: #1b5853; }
.all-history { margin-top: .5rem; }
.notice, .alert { border-radius: 6px; margin-bottom: 1rem; padding: .7rem .95rem; font-size: .92rem; overflow-wrap: anywhere; }
.notice { background: #e8f1e7; border-left: 3px solid #719675; color: #2f5236; }
.alert { background: #fff0e9; border-left: 3px solid #bc622f; color: #7a351e; }
.job { background: #ecf4ed; border-color: #b7cfbb; }
.job-line { margin-bottom: .55rem; }
.job-line strong { overflow-wrap: anywhere; }
progress { display: block; width: 100%; border: 0; border-radius: 5px; height: .55rem; overflow: hidden; background: #d4dfd3; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #d4dfd3; }
progress::-webkit-progress-value { background: var(--accent); }
.job .subtext { margin: .6rem 0; }
.history-toolbar { margin-bottom: 1rem; }
.history-toolbar .field { max-width: 24rem; }
.history-grid { grid-template-columns: minmax(17rem,.93fr) minmax(0,1.3fr); }
.detail .secondary { margin-top: 1rem; }
.detail-title { margin-bottom: .3rem; overflow-wrap: anywhere; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .9rem; padding: .9rem 0; margin: .8rem 0; border-block: 1px solid var(--rule); }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.detail h3 { font-size: 1rem; margin-top: 1rem; }
.detail table { width: 100%; border-collapse: collapse; margin-top: .55rem; font-size: .85rem; }
.detail th, .detail td { padding: .38rem .2rem; border-bottom: 1px solid #e2e8e2; text-align: left; }
.detail th { color: var(--muted); font-weight: 500; }
.table-wrap { max-height: 23rem; overflow: auto; }
.detail th { position: sticky; top: 0; background: #fff; }
.detail .subtext { overflow-wrap: anywhere; }
.downloads { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.download-link { color: var(--accent); font-size: .88rem; text-decoration-thickness: 1px; text-underline-offset: .17em; }
.detail-failure { color: #833e20; margin-top: .75rem; font-size: .9rem; overflow-wrap: anywhere; }
#history-view > .job { margin-bottom: 1rem; }
@media (min-width: 1000px) { .aside { position: sticky; top: 1rem; } }
@media (max-width: 850px) {
  .workspace-grid { grid-template-columns: minmax(0,1.48fr) minmax(14rem,1fr); gap: .8rem; }
  .history-grid { grid-template-columns: minmax(13rem,.85fr) minmax(0,1.25fr); }
  .publish-actions { align-items: flex-start; flex-direction: column; }
  .field-top { flex-wrap: wrap; gap: .2rem; }
  .file-box { padding: .8rem; column-gap: .55rem; }
}
@media (max-width: 650px) {
  .login-layout { display: flex; flex-direction: column; }
  .login-cover { min-height: 14rem; padding: 1.4rem; }
  .login-cover h1 { font-size: clamp(2.4rem,8vw,3.2rem); margin: 2rem 0 0; }
  .cover-image { background-position: center,50% 49%; }
  .login-side { padding: 2.1rem 1.4rem 3rem; }
  .login-panel { width: min(100%,27rem); }
  .mast-inner { min-height: 0; flex-wrap: wrap; gap: 0; }
  .mast-inner .brand { min-height: 3.6rem; font-size: 1.35rem; }
  .mast-inner .brandmark { width: 1.75rem; height: 1.75rem; }
  .account { order: 2; }
  .account-name { max-width: 6rem; }
  .tabs { order: 3; width: 100%; gap: 1.7rem; height: 2.7rem; }
  .workspace-grid, .history-grid { grid-template-columns: minmax(0,1fr); gap: .85rem; }
  .page-heading { flex-wrap: wrap; }
  .page-heading h1 { font-size: 2rem; }
  .publish-actions { align-items: stretch; }
  .history-grid .detail { scroll-margin-top: 1rem; }
}
@media (max-width: 420px) {
  .two-col, .file-grid { grid-template-columns: minmax(0,1fr); gap: .75rem; }
  .file-box { padding: .72rem .85rem; }
  .page-heading .secondary { font-size: .84rem; min-height: 2.25rem; padding: .4rem .7rem; }
}
