@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --green: #1b5e3b;
  --ink: #163b2b;
  --muted: #4d6357;
  --line: #d6dbd0;
  --paper: #f3f1e8;
  --panel: #fffef9;
  --gold: #b8892f;
  --error: #942e20;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .53; cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.wrap { width: min(81rem, calc(100% - clamp(2rem, 8vw, 8rem))); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.bar, .bar nav, .editor-head, .table-toolbar, .publish-bar, .dialog-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 1.15rem;
}
.bar { min-height: 5.75rem; }
.bar nav { justify-content: flex-end; }
.brand { display: block; line-height: 0; }
.brand img { width: 10rem; height: auto; }
.text-link { color: var(--green); font-size: .93rem; font-weight: 700; text-underline-offset: .28rem; }
.primary, .outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.85rem; padding: .65rem 1.25rem; border: 1px solid transparent;
  border-radius: .55rem; font-weight: 720; font-size: .925rem;
}
.primary { color: #fff; background: var(--green); }
.primary:hover:enabled { background: #134b2e; }
.outline { color: var(--green); border-color: #aab8a9; background: transparent; }
a.outline { text-decoration:none; }
.outline:hover:enabled { background: #e6ece1; border-color: var(--green); }
.small { min-height: 2.45rem; padding: .45rem .85rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4.2rem); letter-spacing: -.065em; font-weight: 630; line-height: 1.07; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.75rem); letter-spacing: -.044em; line-height: 1.25; font-weight: 700; }
.lead, .hint { line-height: 1.55; color: var(--muted); }
.lead { margin-top: 1rem; }
.hint, .message, .demo-note, #confirm-body { font-size: .9375rem; line-height: 1.6; }
.loading { padding-block: 3rem; color: var(--muted); }
.login-layout {
  max-width: 65rem; margin: clamp(2rem, 6.4vw, 6.5rem) auto;
  display: grid; grid-template-columns: .88fr 1.12fr;
  background: var(--panel); border: 1px solid var(--line); border-radius: 1.25rem; overflow: hidden;
}
.login-intro { min-height: 26rem; position: relative; background: var(--green); }
.globe { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.login-body { padding: clamp(1.75rem, 5vw, 4rem); align-self: center; }
.login-body h1 { font-size: clamp(2.3rem, 4vw, 3.1rem); }
.login-body form { margin-top: 2rem; }
#login-form > .field-label { display:block; }
#username { margin:.45rem 0 1.1rem; }
.field-label, .cell-label { font-size: .875rem; font-weight: 700; }
input:not([type="checkbox"]), select {
  display: block; width: 100%; min-height: 2.85rem; padding: .6rem .72rem;
  background: #fff; border: 1px solid #b9c5ba; border-radius: .45rem; color: var(--ink);
}
select {
  appearance: none;
  padding-right: 1.85rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%231b5e3b' stroke-width='1.7'/%3E%3C/svg%3E") no-repeat right .58rem center / .7rem .5rem;
}
input[aria-invalid="true"] { border-color: var(--error); }
.password-wrap { position: relative; margin-top: .45rem; }
.password-wrap input { padding-right: 5rem; }
.password-wrap button { position: absolute; right: .32rem; top: .25rem; bottom: .25rem; background: transparent; color: var(--green); border: 0; font-weight: 700; }
.sign-in { margin-top: 1.2rem; width: 100%; }
.owner-login { display:inline-block; margin-top:1.3rem; }
.owner-login.primary { display:inline-flex; text-decoration:none; }
#manager-login { display:block; margin-top:1rem; width:fit-content; }
#owner-settings { margin-top:1.25rem; background:var(--panel); border:1px solid var(--line); border-radius:.75rem; padding:1rem 1.25rem; }
#owner-settings summary { font-weight:700; cursor:pointer; color:var(--green); }
#credentials-form { max-width:28rem; }
#credentials-form .hint { margin-top:.9rem; }
#credentials-form .field-label { display:block; margin:1rem 0 .35rem; }
#credentials-form button { margin-top:1rem; }
#retry-settings { margin-top:.6rem; }
#retry-activation { margin-top:.85rem; }
#activation-login { display:block; margin-top:1.2rem; width:fit-content; }
.message:not(:empty) { margin-top: .9rem; color: var(--green); }
.message.error { color: var(--error); }
.editor { padding: clamp(2rem, 5vw, 5rem) 0 5rem; }
.editor-head { align-items: end; }
.metadata { text-align: right; }
.metadata span, .metadata strong { display: block; }
.metadata span { margin-bottom: .25rem; color: var(--muted); font-size: .875rem; }
.metadata strong { font-size: 1rem; }
.demo-note { margin-top: 2rem; padding: .75rem 1rem; background: #f4ead1; border-inline-start: 3px solid var(--gold); color: #5e4818; }
#rate-form { margin-top: 2.4rem; padding: clamp(1rem, 2.6vw, 2.25rem); background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; }
.table-toolbar { margin-bottom: .75rem; }
#row-count { font-weight: 500; color: var(--muted); font-size: 1rem; vertical-align: middle; }
.table-wrap { margin-top: 1.35rem; }
table { width: 100%; border-collapse: collapse; }
thead { color: var(--muted); }
th { font-size: .875rem; text-align: left; font-weight: 650; }
th, td { padding: .65rem .32rem; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th:nth-child(1) { width: 10%; }
th:nth-child(2) { width: 30%; }
th:nth-child(3) { width: 12%; }
th:nth-child(4), th:nth-child(5) { width: 14%; }
th:nth-child(6), td:nth-child(6), td:last-child { text-align: center; }
td input { font-variant-numeric: tabular-nums; }
td input[data-field="code"] { text-transform: uppercase; font-weight: 700; }
.cell-label { display: none; }
.visible-control { display: inline-flex; min-height: 2.75rem; align-items: center; cursor: pointer; }
.visible-control input { width: 1.35rem; height: 1.35rem; margin: 0; accent-color: var(--green); cursor: pointer; }
.remove { display: inline-flex; align-items: center; justify-content:center; width:2.75rem; height:2.75rem; border:1px solid transparent; border-radius:.45rem; color:#795348; background:transparent; }
.remove:hover { color:var(--error); background:#f8eae3; }
.empty { padding: 1.75rem .4rem; color: var(--muted); }
.publish-bar { padding-top: 1.4rem; }
.publish-bar strong { font-size: 1rem; }
.publish-bar .hint { margin-top: .2rem; }
#reload { margin-top: .75rem; }
dialog { width: min(27rem, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: .9rem; padding: 1.65rem; color: var(--ink); background: var(--panel); }
dialog::backdrop { background: #152c23a8; }
#confirm-body { margin: .8rem 0 1.4rem; color: var(--muted); }
.dialog-actions { justify-content: flex-end; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media (max-width: 55rem) {
  .editor-head { align-items:start; flex-direction:column; gap:1.2rem; }
  .metadata { text-align:left; }
  .metadata span, .metadata strong { display:inline; }
  .metadata span { margin-right:.5rem; }
  table, tbody { display:block; }
  thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  tbody tr { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.75rem; border-top:1px solid var(--line); padding:1rem 0; }
  td, td:first-child, td:last-child { display:block; border:0; padding:0; text-align:left; }
  td:nth-child(1), td:nth-child(3), td:nth-child(4), td:nth-child(5) { grid-column:span 2; }
  td:nth-child(2) { grid-column:span 4; }
  td:nth-child(6) { text-align:left; grid-column:span 5; align-self:center; }
  td:last-child { justify-self:end; }
  .visible-control { gap:.6rem; }
  .cell-label { display:block; margin-bottom:.25rem; color:var(--muted); }
  .visible-control .cell-label { margin:0; }
  .publish-bar { border-top:1px solid var(--line); }
}
@media (max-width: 44rem) {
  .bar { min-height:4.75rem; }
  .brand img { width:7.4rem; }
  .bar nav { gap:.65rem; }
  .login-layout { grid-template-columns:1fr; max-width:30rem; margin-block:2rem; }
  .login-intro { min-height:8rem; }
  .globe { object-position:50% 43%; }
  .login-body { padding:1.5rem; }
}
@media (max-width: 34rem) {
  .publish-bar { flex-direction:column; align-items:stretch; }
  .table-toolbar { align-items:start; flex-wrap:wrap; gap:.7rem; }
  .bar .text-link { font-size:.85rem; }
  .bar nav { flex-wrap:wrap; row-gap:.35rem; }
  .small { font-size:.85rem; padding-inline:.6rem; }
}
