:root {
  --ink:#172e2c;
  --teal:#164d43;
  --green:#287466;
  --lime:#ccf28d;
  --border:#dbe2dc;
  --muted:#53675e;
  --paper:#f5f6f0;
  --white:#fff;
  --radius:15px;
  font:15px/1.5 Inter,"Helvetica Neue",Arial,sans-serif;
  color:var(--ink);
  background:var(--paper);
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  min-height:100vh;
}

button,input,select {
  font:inherit;
}

button,a.button,.template,select {
  cursor:pointer;
}

button:focus-visible,a:focus-visible,input:focus,select:focus,#drop:focus {
  outline:3px solid #639e7e;
  outline-offset:3px;
}

button {
  color:inherit;
}

a {
  color:var(--teal);
}

[hidden] {
  display:none!important;
}

header {
  min-height:72px;
  border-bottom:1px solid var(--border);
  background:var(--white);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px clamp(20px,4vw,66px);
  gap:16px;
}

.brand,#account,.card-heading,.template,.sample-bar,.sample-foot {
  display:flex;
  align-items:center;
  gap:12px;
}

.brand b {
  font-size:22px;
  letter-spacing:-1.1px;
}

.brand b span {
  font-weight:450;
}

.brand small,.tag {
  border:1px solid var(--border);
  padding:2px 7px;
  border-radius:5px;
  font:11px/1.6 ui-monospace,monospace;
  color:var(--muted);
}

.avatar,.file-symbol {
  display:grid;
  place-items:center;
  background:#e3efde;
  border-radius:8px;
  color:var(--teal);
  font-weight:750;
}

.avatar {
  width:31px;
  height:31px;
  border-radius:50%;
}

.quiet {
  background:none;
  border:0;
  padding:5px 0;
  color:var(--green);
  font-weight:600;
  font-size:13px;
}

.quiet:hover {
  text-decoration:underline;
}

#email {
  font-size:13px;
}

.eyebrow,.space-label {
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:700;
  color:var(--green);
}

h1,h2,p {
  margin:0;
}

h1,h2 {
  line-height:1.1;
}

h1 {
  font-size:clamp(34px,4vw,58px);
  letter-spacing:-.055em;
}

h2 {
  font-size:21px;
  letter-spacing:-.045em;
}

.lead,.intro-title>p:last-child,.form-card p {
  color:var(--muted);
}

#auth {
  max-width:1240px;
  margin:clamp(28px,7vh,84px) auto;
  padding:0 34px;
  display:grid;
  grid-template-columns:1.15fr 1fr;
  align-items:stretch;
}

.intro {
  background:var(--teal);
  background-image:linear-gradient(125deg,transparent 50%,#235f50);
  color:#fff;
  border-radius:23px 0 0 23px;
  padding:clamp(30px,4vw,62px);
  display:flex;
  flex-direction:column;
  gap:44px;
}

.intro .eyebrow {
  color:var(--lime);
  margin-bottom:24px;
}

.intro h1 {
  font-size:clamp(42px,5.1vw,77px);
  font-weight:540;
  line-height:1;
}

.intro-title>p:last-child {
  color:#dce7dc;
  margin-top:20px;
  max-width:385px;
  font-size:16px;
}

.sample {
  background:#f9fbf1;
  color:var(--ink);
  border-radius:12px;
  padding:17px 21px;
  max-width:415px;
  box-shadow:5px 6px 0 #87a28a;
}

.sample-bar {
  justify-content:space-between;
  font-size:13px;
}

.sample-bar>span {
  font:10px ui-monospace,monospace;
  color:var(--muted);
}

.sample-grid {
  display:grid;
  grid-template-columns:1fr .3fr .3fr;
  font-size:12px;
  margin:12px 0;
}

.sample-grid>* {
  padding:5px 2px;
  border-bottom:1px solid var(--border);
}

.sample-grid>b {
  color:var(--muted);
  font-size:10px;
}

.sample-foot {
  font:11px ui-monospace,monospace;
  gap:8px;
}

.sample-foot strong {
  padding:3px 7px;
  background:#e7eddb;
  border-radius:3px;
}

.sample-foot i {
  font-style:normal;
}

.auth-panel {
  background:white;
  border:1px solid var(--border);
  border-left:0;
  border-radius:0 23px 23px 0;
  display:grid;
  place-items:center;
  padding:36px;
}

.auth-card {
  width:min(100%,340px);
}

.auth-card h2 {
  font-size:34px;
  margin-bottom:24px;
}

.segmented {
  border-radius:7px;
  background:#edf0e9;
  display:flex;
  padding:4px;
  gap:4px;
  margin-bottom:28px;
}

.segmented button {
  flex:1;
  border:0;
  background:transparent;
  border-radius:5px;
  padding:8px;
}

.segmented [aria-pressed=true] {
  background:white;
  box-shadow:0 1px 5px #1c3a291a;
  font-weight:650;
}

form label {
  display:block;
  font-weight:600;
  font-size:13px;
  margin-top:18px;
}

form input,select {
  width:100%;
  border:1px solid #bccbc1;
  border-radius:7px;
  padding:11px 13px;
  background:white;
  color:var(--ink);
}

form input {
  display:block;
  margin-top:6px;
}

#auth-submit {
  width:100%;
  margin-top:23px;
}

.primary,.button {
  border:0;
  border-radius:7px;
  background:var(--teal);
  color:white;
  padding:11px 19px;
  font-weight:650;
  text-decoration:none;
  display:inline-block;
}

.primary:hover,.button:hover {
  background:#246651;
}

.primary:disabled {
  cursor:default;
  background:#dce3dc;
  color:#65796a;
}

.error {
  background:#fff0e9;
  border-radius:7px;
  color:#913b28;
  padding:10px 13px;
  font-size:14px;
  overflow-wrap:anywhere;
  margin-top:12px;
}

.muted {
  font-size:13px;
  color:var(--muted);
  margin-top:8px;
}

#desk {
  max-width:1620px;
  margin:auto;
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  min-height:calc(100vh - 72px);
}

aside {
  background:#edf1e8;
  border-right:1px solid var(--border);
  padding:35px 18px;
}

.space-label {
  letter-spacing:.08em;
  color:var(--muted);
}

aside select {
  margin:9px 0 26px;
  font-weight:600;
  font-size:13px;
}

nav {
  display:flex;
  flex-direction:column;
  gap:5px;
}

nav button {
  display:flex;
  align-items:center;
  gap:13px;
  background:transparent;
  border:0;
  border-radius:7px;
  text-align:left;
  padding:11px 13px;
}

nav button span {
  font-size:22px;
  line-height:1;
}

nav button[aria-current=page] {
  background:#d8e7d7;
  color:var(--teal);
  font-weight:650;
}

.content {
  padding:clamp(26px,4vw,62px);
  min-width:0;
}

.content .eyebrow {
  margin-bottom:12px;
}

.lead {
  font-size:16px;
  margin:12px 0 29px;
}

.work-grid {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(230px,.85fr);
  gap:18px;
}

.upload-card,.form-card,.history-block,.result-card {
  background:white;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:clamp(18px,2.2vw,30px);
}

.card-heading,.sample-bar {
  justify-content:space-between;
}

.form-card {
  background:#eaf1e2;
}

.form-card p {
  line-height:1.45;
  margin:14px 0 20px;
  font-size:14px;
}

.template {
  border-top:1px solid #c6d5c5;
  color:inherit;
  text-decoration:none;
  padding:14px 0;
  gap:10px;
}

.template:hover b {
  text-decoration:underline;
}

.template b,.template small {
  display:block;
}

.template small {
  color:var(--muted);
  font-size:11px;
}

.template i {
  margin-left:auto;
  font-size:20px;
  font-style:normal;
}

.file-symbol {
  width:32px;
  height:39px;
  border:1px solid #85a795;
  border-radius:4px;
  background:#f6faef;
  font:700 18px ui-monospace,monospace;
}

article .file-symbol {
  margin-bottom:18px;
}

#drop {
  border:1.5px dashed #a6b9a8;
  border-radius:9px;
  background:#fafbf6;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  margin:20px 0 14px;
  padding:23px 10px;
  cursor:pointer;
  gap:4px;
  text-align:center;
  overflow-wrap:anywhere;
}

#drop.drag,#drop:hover {
  background:#edf5e7;
  border-color:var(--green);
}

.upload-icon {
  width:35px;
  height:35px;
  display:grid;
  place-items:center;
  background:#e4eddc;
  border-radius:9px;
  color:var(--teal);
  font-size:22px;
  margin-bottom:6px;
}

#drop-caption,#drop small {
  color:var(--muted);
  font-size:13px;
}

#drop small {
  font-size:11px;
  margin-top:5px;
}

.sr {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
}

.history-block,.result-card {
  margin-top:22px;
}

.result-card {
  border-color:#a4c5ad;
}

.history-row {
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:space-between;
  padding:15px 0;
  border-bottom:1px solid var(--border);
}

.history-row:last-child {
  border-bottom:0;
}

.history-row>div:first-child {
  min-width:0;
}

.history-row b,.result-card p {
  overflow-wrap:anywhere;
}

.history-row small {
  display:block;
  color:var(--muted);
  font-size:12px;
}

.actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:14px;
}

.actions a,.report summary {
  font-size:13px;
  font-weight:650;
}

.empty {
  padding:24px 0 5px;
  color:var(--muted);
  font-size:14px;
}

.result-card h2 {
  margin-bottom:10px;
}

.result-card .actions {
  margin-top:14px;
}

.report {
  margin-top:12px;
  font-size:13px;
}

.report summary {
  cursor:pointer;
  color:var(--green);
}

.report ul {
  padding-left:20px;
}

.report li {
  margin:4px 0;
  overflow-wrap:anywhere;
}

#fatal {
  padding:24px;
  color:#913b28;
}

@media(max-width:920px) {
  #desk {
    grid-template-columns:190px minmax(0,1fr);
  }
  .work-grid {
    grid-template-columns:1fr;
  }
  .content {
    padding:28px 22px;
  }
  #auth {
    padding:0 20px;
  }
  .intro {
    padding:34px 26px;
  }
  .auth-panel {
    padding:25px;
  }
  .brand b {
    font-size:20px;
  }
}

@media(max-width:670px) {
  header {
    min-height:59px;
    padding:10px 16px;
  }
  #email {
    display:none;
  }
  #auth {
    display:flex;
    flex-direction:column;
    margin:16px auto;
    padding:0 14px;
  }
  .intro {
    border-radius:15px 15px 0 0;
    padding:23px;
    gap:0;
  }
  .intro .eyebrow {
    margin-bottom:12px;
  }
  .intro h1 {
    font-size:38px;
  }
  .intro-title>p:last-child {
    font-size:14px;
    margin-top:12px;
  }
  .sample {
    display:none;
  }
  .auth-panel {
    border:1px solid var(--border);
    border-radius:0 0 15px 15px;
    padding:23px;
  }
  .auth-card {
    width:100%;
  }
  .auth-card h2 {
    font-size:27px;
    margin-bottom:15px;
  }
  .segmented {
    margin-bottom:16px;
  }
  #desk {
    display:block;
  }
  .content {
    padding:22px 14px;
  }
  aside {
    padding:9px 14px;
    border-right:0;
    border-bottom:1px solid var(--border);
  }
  aside select {
    margin:4px 0 8px;
    max-width:100%;
    padding:6px;
  }
  .space-label {
    font-size:9px;
  }
  nav {
    flex-direction:row;
    gap:4px;
  }
  nav button {
    font-size:12px;
    padding:7px 8px;
    gap:4px;
  }
  nav button span {
    font-size:16px;
  }
  .history-row {
    flex-wrap:wrap;
  }
  .lead {
    margin-bottom:18px;
  }
  .tag {
    font-size:9px;
  }
}

#review {
  margin:12px 0;
  max-height:250px;
  overflow:auto;
}

#review li {
  font-size:12px;
}

.grand-review { margin-top:20px; min-width:0; }
.grand-review > label,.grand-field span { font-weight:600; }
.grand-review select,.grand-field input { max-width:100%; padding:9px 10px; border:1px solid var(--border); border-radius:6px; background:white; color:inherit; }
.grand-review > select { display:block; margin:6px 0 12px; }
.grand-review .table-scroll { overflow:auto; max-height:320px; margin:12px 0 20px; }
.grand-review table { width:100%; border-collapse:collapse; font-size:13px; }
.grand-review th,.grand-review td { text-align:left; padding:8px; border-bottom:1px solid var(--border); }
.grand-review th { position:sticky; top:0; background:#eff5f2; }
#grand-fields,#grand-values { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:12px 16px; }
.grand-field { display:flex; flex-direction:column; gap:5px; padding:8px 0; overflow-wrap:anywhere; }
.grand-field small { color:var(--muted); }
#grand-submit,#grand-entered { margin-top:15px; }

#draft-library h1 { margin-bottom:6px; }
#draft-editor .card-heading { align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
#grand-heading { overflow-wrap:anywhere; }
#draft-save { font-size:13px; }
#draft-save[data-unsaved="true"] { color:#845120; }
#draft-result { margin-top:14px; }
#draft-list .history-row small { display:block; color:var(--muted); }
.shared-panel { padding:12px 0; margin-bottom:14px; border-block:1px solid var(--border); }
.shared-panel summary { color:var(--green); font-weight:600; cursor:pointer; }
.shared-panel fieldset { border:1px solid var(--border); border-radius:8px; margin:12px 0; padding:10px 12px; }
.upload-options { display:flex; flex-direction:column; gap:6px; margin-top:12px; }
.upload-options .check-label { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink); cursor:pointer; }
.notice-ok { background:#ebf7f3; border:1px solid #b5ded1; color:#125649; border-radius:8px; padding:10px 12px; font-size:13px; margin:8px 0; }
.auth-links { display:flex; flex-wrap:wrap; gap:10px; justify-content:space-between; margin-top:12px; }
.shared-panel .check-label { display:flex; align-items:center; gap:8px; font-size:14px; margin:7px 0; }
.check-label input { width:auto; accent-color:var(--teal); }
.sheet-checks,#shared-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)); gap:4px 12px; }
.sheet-checks { max-height:220px; overflow:auto; }
#shared-picker { display:block; max-width:100%; margin:5px 0; }
#shared-fields input,#shared-fields select { width:100%; }
#shared-message { margin-bottom:0; }
#grand-sheet { width:min(100%,480px); }
@media(max-width:670px){ nav {flex-wrap:wrap;} }
