:root {
  color-scheme: light;
  --ink: #202f33;
  --muted: #4b6066;
  --line: #cdd9d8;
  --paper: #fff;
  --tint: #edf5f2;
  --accent: #19594f;
  --dark: #143c37;
  --focus: #935007;
  --error: #923627;
  font: 100%/1.65 Inter, "Leelawadee UI", Tahoma, sans-serif;
  color: var(--ink);
  background: #f7f9f8;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: .45rem 1.05rem; border: 1px solid var(--accent);
  border-radius: .45rem; background: var(--accent); color: #fff; font-weight: 650;
  cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--dark); }
button.secondary, .button.secondary { background: var(--paper); color: var(--accent); border-color: #8da8a2; }
button.secondary:hover, .button.secondary:hover { background: var(--tint); }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-175%); padding: .5rem 1rem; background: white; z-index: 2; }
.skip:focus { transform: none; }
.masthead {
  display: flex; align-items: center; gap: 1.3rem; min-height: 4.5rem;
  padding: .6rem clamp(1.15rem, 3.5vw, 4rem); background: var(--dark); color: #fff;
}
.brand { display: flex; align-items: baseline; gap: .5rem; font-weight: 650; }
.wordmark { color: #b9e6d1; font: 790 1.38rem/1 Inter, Arial, sans-serif; letter-spacing: -.065em; }
.product { border-left: 1px solid #68918a; padding-left: 1.3rem; font-size: .92rem; }
.account-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem 1.1rem; margin-inline-start:auto; }
.account-actions a, .account-actions button { color:#fff; font-size:.92rem; }
.account-actions button { min-height:2.25rem; border-color:#81a99c; background:transparent; }
.account-actions button:hover { background:#24564e; }
.auth-main { max-width:34rem; margin:clamp(1.2rem,6vw,5rem) auto; padding:0 1rem; }
.auth-panel > * + *, #auth-content > * + *, .auth-form > * + * { margin-top:1rem; }
.auth-panel h1 { font-size:clamp(1.4rem,4vw,2rem); }
.auth-panel #auth-status:empty { display:none; }
.auth-form { display:block; }
#auth-error { padding:.65rem .85rem; border:1px solid #d9a89e; border-radius:.4rem; color:var(--error); background:#fbeae6; }
.setup-key { display:block; overflow-wrap:anywhere; letter-spacing:.08em; padding:.75rem; background:var(--tint); border-radius:.4rem; user-select:all; }
@media(max-width:37rem) {
  .masthead:has(.account-actions) { flex-wrap:wrap; padding-block:.65rem; gap:.3rem .65rem; }
  .account-actions { width:100%; margin:0; }
}
.layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: calc(100vh - 4.5rem); max-width: 92rem; margin: auto; }
.sidebar { padding: 2rem .9rem; border-right: 1px solid var(--line); }
.sidebar a { display: block; padding: .65rem .85rem; margin-bottom: .2rem; border-radius: .4rem; text-decoration: none; font-weight: 600; }
.sidebar a:hover { background: #e6efeb; }
.sidebar a[aria-current="page"] { background: #dcebe4; color: #164a3f; box-shadow: inset 3px 0 var(--accent); }
main { min-width: 0; padding: clamp(1.1rem, 3vw, 3rem); }
#content { max-width: 70rem; margin-inline: auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3.5vw, 2.45rem); line-height: 1.4; font-weight: 720; }
h2 { font-size: 1.16rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.muted, .hint, .empty { color: var(--muted); }
.hint { font-size: .89rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: .65rem; padding: clamp(1rem, 2.3vw, 1.65rem); }
.panel + .panel, .panel + .actions { margin-top: 1rem; }
.panel > * + *, fieldset > * + * { margin-top: .8rem; }
.empty { padding: .9rem 0; }
.record { padding: 1rem 0; }
.record + .record { border-top: 1px solid var(--line); }
.record-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; }
.identifier { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.meta { margin-top: .35rem; font-size: .9rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .4rem 0; list-style: none; }
.tag, .state { display: inline-block; padding: .12rem .55rem; border-radius: .35rem; background: var(--tint); color: var(--dark); font-size: .875rem; }
.state.review { background: #fff0cc; color: #694708; }
.state.closed { background: #e9eced; color: #3d5156; }
.actions, .controls { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
form.request { max-width: 49rem; }
form.search { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem; margin-bottom: .85rem; }
form.search .field { flex: 1 1 15rem; max-width: 32rem; }
.search input { min-width: 0; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend, .field-label { display: block; font-weight: 650; }
.field { display: grid; gap: .3rem; }
.field input, .field select { width: 100%; padding: .5rem .65rem; border: 1px solid #8b9da0; border-radius: .35rem; min-height: 2.75rem; background: white; color: var(--ink); }
.field input[readonly] { background: #f1f4f3; }
.choices { display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.choice { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .65rem; min-height: 2.7rem; border: 1px solid var(--line); border-radius: .35rem; cursor: pointer; }
.choice:has(:checked) { color: var(--dark); border-color: var(--accent); background: var(--tint); }
.choice input { width: 1.08rem; height: 1.08rem; accent-color: var(--accent); }
.request > * + *, form.review > * + * { margin-top: 1rem; }
form.review { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .9rem; max-width: 43rem; }
.notice, #problem { margin-bottom: 1rem; padding: .65rem .85rem; border-radius: .4rem; }
.notice { background: #dff1e8; color: #184b38; }
#problem { background: #fbeae6; color: var(--error); border: 1px solid #d9a89e; }
#feedback:empty { margin: 0; }
details { margin-top: .55rem; }
summary { cursor: pointer; color: var(--accent); }
.scroller { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { text-align: start; vertical-align: top; padding: .48rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); }
@media (max-width: 48rem) {
  .masthead { min-height: 3.75rem; gap: .8rem; }
  .product { padding-left: .8rem; }
  .layout { display: block; }
  .sidebar { display: flex; flex-wrap: wrap; padding: .4rem .65rem; gap: .2rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar a { padding: .5rem .65rem; margin: 0; }
  .sidebar a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
}
@media (max-width: 28rem) {
  .masthead { padding-inline: .85rem; }
  .product { font-size: .8rem; }
  main { padding: 1rem .75rem; }
  .sidebar a { font-size: .9rem; }
}
