:root {
    color-scheme: light;
    --purple: #7827d4;
    --purple-dark: #552095;
    --purple-deep: #331554;
    --ink: #1d1428;
    --muted: #625a6c;
    --line: #e7e0ec;
    --lavender: #f2eafb;
    --paper: #f8f6fa;
    --white: #fff;
    --green: #196047;
    --green-bg: #e9f7ee;
    --radius: 16px;
    font: 16px/1.5 Inter, system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
img { max-width: 100%; }
a { color: var(--purple-dark); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
h1, h2, p { margin: 0; }
h1, h2, strong { line-height: 1.16; }
h1 { font-size: clamp(1.95rem, 4vw, 2.85rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 3; padding: .6rem 1rem; background: var(--white); transform: translateY(-160%); }
.skip:focus { transform: none; }
.muted { color: var(--muted); }
.eyebrow { color: var(--purple-dark); font-size: .79rem; font-weight: 750; letter-spacing: .075em; margin-bottom: .65rem; }
.button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: .65rem 1rem; border: 1px solid transparent;
    border-radius: 9px; font-size: .93rem; font-weight: 750; text-align: center;
    text-decoration: none; white-space: normal;
}
.button-primary { color: var(--white); background: var(--purple); }
.button-primary:hover { background: var(--purple-dark); }
.button-outline { color: var(--purple-dark); border-color: #d7c6e8; background: var(--white); }
.button-outline:hover { background: var(--lavender); }
.button-small { min-height: 38px; padding: .4rem .8rem; }
.notice { padding: .65rem .85rem; margin-bottom: 1rem; border-radius: 9px; }
.success { background: var(--green-bg); color: var(--green); }
.danger { background: #faebef; color: #861d37; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem 1.4rem; margin-bottom: 1.5rem; }
.page-head > div { min-width: 0; }
.page-head > :last-child { flex-shrink: 0; }
.page-head > div:only-child { flex-shrink: 1; }
.page-head p:not(.eyebrow) { color: var(--muted); margin-top: .55rem; }
.backlink { display: inline-block; font-size: .9rem; font-weight: 700; margin-bottom: .8rem; text-decoration-thickness: .075em; text-underline-offset: .18em; }
.panel, .table-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: clamp(1rem, 2.4vw, 2rem); }
.panel > h2 { margin-bottom: .55rem; }
.panel > p { margin-bottom: 1rem; }
.narrow { max-width: 660px; }
.spaced { margin-top: 1.3rem; }
section.spaced > h2 { margin-bottom: .7rem; }
.table { width: 100%; table-layout: fixed; border-spacing: 0; font-size: .92rem; }
.table th, .table td { padding: .7rem .85rem; text-align: left; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table th { color: var(--muted); font-weight: 750; background: #fbf8fd; }
.table th:first-child { border-top-left-radius: var(--radius); }
.table th:last-child { border-top-right-radius: var(--radius); }
.table td { border-top: 1px solid var(--line); }
.table tbody tr:hover { background: #fbf8fd; }
.table .audience-column { width: clamp(112px, 11vw, 146px); }
.table .code { color: var(--purple-dark); font-weight: 740; }
.table-action { color: var(--purple-dark); background: none; border: 0; padding: 0; font-weight: 750; font-size: .86rem; text-decoration: underline; text-underline-offset: .17em; }
.table-action:hover { color: var(--purple); }
.tag { display: inline-block; background: var(--lavender); color: var(--purple-dark); padding: .19rem .48rem; border-radius: 7px; font-size: .79rem; font-weight: 720; white-space: nowrap; }
.tag-yes { background: var(--green-bg); color: var(--green); }
.filters { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.filters a { padding: .45rem .8rem; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: .9rem; font-weight: 700; }
.filters a.selected, .filters a:hover { background: var(--lavender); border-color: #d9c7ee; }
.stack-form, .login-card form { display: grid; gap: .48rem; }
.stack-form > label:not(:first-of-type), .login-card label:not(:first-of-type) { margin-top: .48rem; }
label { font-size: .9rem; font-weight: 700; }
input:not([type="checkbox"]):not([type="hidden"]), select {
    min-width: 0; width: 100%; min-height: 45px; padding: .5rem .7rem; border: 1px solid #d6cddd;
    border-radius: 8px; background: var(--white); color: var(--ink);
}
.stack-form .button, .login-card .button { margin-top: .65rem; }
.stack-form .button { justify-self: start; }
.checkbox { display: flex; align-items: center; gap: .35rem; }
.checkbox input { accent-color: var(--purple); }
.workspace-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.space-card {
    display: flex; flex-direction: column; min-width: 0; gap: 8px; padding: 20px;
    color: var(--ink); text-decoration: none; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius);
}
.space-card:hover { border-color: var(--purple); }
.space-card strong { font-size: 1rem; }
.space-card > span { color: var(--muted); }
.plain-list { margin: .55rem 0 0; padding-left: 1.2rem; }
.plain-list li + li { margin-top: .2rem; }
.scenario-details { margin-top: 1rem; }
.scenario-details dd { margin: 0 0 .65rem; color: var(--muted); }
summary { cursor: pointer; font-weight: 730; color: var(--purple-dark); }
.login-page { background: var(--white); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.login-identity {
    position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 655px; padding: clamp(1.4rem, 4.7vw, 5rem); color: #fff;
    background: radial-gradient(ellipse at 86% 76%, #7936ae 0%, #492375 39%, #2d1649 76%);
}
.login-brand { display: flex; align-items: center; gap: .85rem; font-weight: 760; }
.login-brand img { display: block; width: 135px; height: auto; padding: .35rem .55rem; background: #fff; border-radius: 10px; }
.login-story { padding-top: 4rem; max-width: 37rem; }
.login-story .eyebrow { color: #ecd9ff; }
.login-story h2 { font-size: clamp(2.6rem, 6vw, 5.85rem); font-weight: 700; letter-spacing: -.065em; }
.login-story > p:last-child { margin-top: 1.05rem; font-size: 1.06rem; max-width: 28rem; color: #efe3f9; }
.login-art { position: absolute; inset: 0; z-index: -1; overflow: clip; pointer-events: none; }
.login-art i { position: absolute; display: block; width: 78%; aspect-ratio: 1; border: 1px solid #f1cafa42; border-radius: 28%; transform: rotate(38deg); right: -44%; top: -10%; }
.login-art i:nth-child(2) { right: -34%; top: -2%; }
.login-art i:nth-child(3) { right: -24%; top: 6%; }
.login-access { display: grid; place-items: center; padding: clamp(1.3rem, 5vw, 5rem); }
.login-card { width: min(100%, 410px); }
.login-card h1 { font-size: clamp(2rem, 4vw, 3.35rem); }
.login-card .muted { margin: .55rem 0 1.65rem; }
.login-help { color: var(--muted); font-size: .875rem; margin-top: 1.25rem; }

@media (max-width: 640px) {
    .page-head { align-items: flex-start; flex-direction: column; }
    .workspace-cards, .login-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
    .login-identity { min-height: 0; padding: 1.15rem; }
    .login-brand img { width: 100px; }
    .login-story { padding-top: .9rem; }
    .login-story h2 { font-size: 1.85rem; }
    .login-story h2 br { display: none; }
    .login-story > p:last-child { display: none; }
    .login-story .eyebrow { font-size: .66rem; }
    .login-access { align-items: start; padding-top: 1.55rem; }
    .table .optional { display: none; }
    .table th, .table td { padding: .53rem .38rem; font-size: .81rem; }
    .table th:first-child[style] { width: 90px !important; }
    .table-action { font-size: .81rem; }
    .table .tag { font-size: .73rem; }
}
