:root {
  color-scheme: light;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  background: #e9f0ec;
  color: #252c21;
  --muted: #555c50;
  --paper: #f7faf8;
  --line: #c9d8ce;
  --green: #1c482e;
  --green-soft: #e4eee1;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 18rem; }
button, input, textarea { font: inherit; }
button, input, textarea { min-height: 2.75rem; border-radius: .4rem; }
button { cursor: pointer; padding: .45rem .9rem; border: 1px solid var(--green); background: var(--green); color: white; font-weight: 600; }
button:hover:not(:disabled) { filter: brightness(1.14); }
button:disabled { cursor: default; opacity: .55; }
.sso-connect { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .55rem .9rem; border-radius: .4rem; background: var(--green); color: white; font-weight: 600; text-decoration: none; }
.sso-connect:hover { filter: brightness(1.14); }
:focus-visible { outline: 3px solid #086446; outline-offset: 3px; }
.subtle { color: var(--green); background: transparent; border-color: #829580; }
input, textarea { background: white; border: 1px solid #899284; padding: .55rem .75rem; width: 100%; }
label { font-size: .9rem; font-weight: 650; }
textarea, code, .revision, .report-status { font-family: 'SFMono-Regular', Consolas, monospace; }
textarea { resize: vertical; }
h1, h2, p { margin: 0; }
h1 { font-family: 'Baskerville', 'Palatino Linotype', Georgia, serif; font-weight: 600; font-size: clamp(2.5rem, 6vw, 4rem); line-height: .98; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1rem; letter-spacing: -.02em; }
.masthead { padding: .8rem max(1.25rem, calc((100vw - 73rem)/2)); border-bottom: 1px solid var(--line); min-height: 4.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font: 600 1.55rem 'Baskerville', 'Palatino Linotype', Georgia, serif; letter-spacing: -.04em; }
.masthead-label { margin-left: .65rem; color: var(--muted); font-size: .8rem; }
main { width: min(73rem, calc(100% - 2.5rem)); margin: auto; padding: 2rem 0 4rem; }
#sign-in { max-width: 39rem; margin: min(9vw, 5rem) auto 0; padding: clamp(1.25rem, 4vw, 3rem); border: 1px solid var(--line); border-top: .2rem solid var(--green); background: var(--paper); }
#sign-in p { margin: .85rem 0 1.8rem; color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin-top: .35rem; }
.feedback { margin-bottom: 1rem; font-size: .875rem; }
.feedback p:not(:empty) { margin-top: .75rem; }
#notice { color: var(--green); }
#error { color: #8a2831; }
#sign-in:not([hidden]) + .feedback { max-width: 39rem; margin-inline: auto; }
#session { display: grid; grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
aside { padding: 1rem 1rem 1rem 0; border-right: 1px solid var(--line); }
aside nav ul { list-style: none; padding: 0; margin: .7rem 0 1.3rem; }
aside nav button { display: block; width: 100%; border-color: transparent; text-align: left; overflow-wrap: anywhere; }
aside nav button[aria-current] { background: var(--green-soft); }
.stack { display: grid; gap: .45rem; }
.stack > :is(button, .actions) { margin-top: .4rem; }
.stack textarea { margin-bottom: .15rem; }
.stack input + label { margin-top: .6rem; }
.account-tools { border-top: 1px solid var(--line); margin-top: 1.35rem; padding-top: 1.15rem; }
.account-tools input[readonly] { font-family: 'SFMono-Regular', Consolas, monospace; font-size: .8rem; }
.account-tools #invite-form { margin-top: .6rem; }
.workspace-header { display: flex; gap: 1rem; justify-content: space-between; align-items: end; margin: .6rem 0 1.6rem; }
.revision { color: var(--green); font-size: .82rem; margin-bottom: .55rem; }
.panel { background: var(--paper); border: 1px solid var(--line); padding: clamp(.9rem, 3vw, 1.6rem); margin-bottom: 1rem; }
.hint, .empty { color: var(--muted); font-size: .875rem; }
.panel h2 + .hint { margin-top: .85rem; }
.empty { padding: 1rem 0; }
.skill-list, .record-list { padding: 0; list-style: none; margin: .8rem 0 0; }
.skill-list { margin-bottom: 1rem; }
.skill-list li, .record-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1rem; padding: .75rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.skill-list li code, .record-list li strong { margin-right: auto; }
.skill-list button, .record-list button { padding-inline: .7rem; font-size: .85rem; }
.report-status { font-size: .82rem; color: #42493b; }
.report-status[data-status="applied"] { color: var(--green); }
.report-status[data-status="drifted"] { color: #8a3c18; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 42rem) {
  #session { grid-template-columns: 1fr; gap: 1rem; }
  aside { padding: 0 0 1.1rem; border: 0; border-bottom: 1px solid var(--line); }
  .workspace-header { flex-wrap: wrap; }
}
