@layer base, components, responsive;
@layer base {
  :root { color-scheme: light; --ink:#202c29; --muted:#6e7974; --green:#153f37; --accent:#c9dfbb; --paper:#f7f8f4; --line:#e3e7de; --white:#fff; font-family:Inter,"Segoe UI",Arial,sans-serif; font-size:14px; line-height:1.55; color:var(--ink); background:var(--paper); }
  * { box-sizing:border-box; }
  body { margin:0; min-width:320px; }
  h1,h2,h3,p { margin:0; }
  h1 { font-size:clamp(28px,2.6vw,39px); font-weight:550; letter-spacing:-1.5px; line-height:1.18; }
  h2 { font-size:18px; font-weight:600; letter-spacing:-.4px; line-height:1.4; }
  button,input,select { font:inherit; }
  button,a,input,select { -webkit-tap-highlight-color:transparent; }
  button,a { touch-action:manipulation; }
  button { cursor:pointer; }
  button:disabled { opacity:.48; cursor:not-allowed; }
  a { color:var(--green); }
  svg { width:20px; height:20px; flex-shrink:0; }
  code { font-family:"Cascadia Code",Consolas,monospace; }
  :focus-visible { outline:3px solid #83a993; outline-offset:4px; }
  ::selection { background:#c9dfbb; color:#153f37; }
  .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .skip-link { position:fixed; top:-60px; left:16px; background:#fff; padding:12px 18px; z-index:50; }
  .skip-link:focus { top:10px; }
  .muted { color:var(--muted); }
  .small { font-size:12px; }
  .stack { display:flex; flex-direction:column; gap:6px; min-width:0; }
  .eyebrow { display:block; font-size:10px; letter-spacing:1.8px; font-weight:700; text-transform:uppercase; color:#6d7c69; }
}
@layer components {
  .brand { display:flex; align-items:center; gap:11px; font-size:18px; font-weight:650; letter-spacing:-.6px; white-space:nowrap; }
  .brand-mark { display:inline-flex; width:36px; height:36px; border-radius:11px; align-items:center; justify-content:center; background:var(--green); color:#fff; font-family:Georgia,serif; font-size:25px; letter-spacing:-3px; padding-right:3px; font-weight:400; }
  .button { display:inline-flex; justify-content:center; align-items:center; gap:8px; border:1px solid transparent; border-radius:8px; padding:11px 17px; background:#e9eee5; color:var(--green); font-weight:600; line-height:1.4; text-decoration:none; transition:background .15s; }
  .button.primary { background:var(--green); color:#fff; box-shadow:0 2px 3px #153f3712; }
  .button.primary:hover:not(:disabled) { background:#24584b; }
  .button.secondary { background:#fff; border-color:#d9e0d4; color:#344c40; }
  .button.secondary:hover:not(:disabled) { background:#f0f4ed; }
  .button.danger { background:#fff0ec; color:#9a392c; border-color:#ebcec7; }
  .button.danger:hover:not(:disabled) { background:#fce3dc; }
  .button.small { padding:8px 12px; font-size:12px; }
  .text-button { display:inline-flex; align-items:center; justify-content:flex-start; gap:7px; background:none; border:0; padding:3px 0; color:#34604e; font-size:13px; text-decoration:none; text-align:left; font-weight:550; }
  .text-button:hover { text-decoration:underline; text-underline-offset:4px; }
  .text-button.small { font-size:12px; }
  .form { display:flex; flex-direction:column; gap:17px; margin-top:23px; }
  .field { display:flex; flex-direction:column; gap:7px; min-width:0; }
  .field-label { font-size:12px; font-weight:600; color:#4c5b53; }
  .field-hint { font-size:11px; color:var(--muted); font-weight:400; }
  input,select { width:100%; min-width:0; padding:11px 12px; border:1px solid #d8dfd4; border-radius:7px; background:#fff; color:var(--ink); line-height:1.45; }
  input::placeholder { color:#a1aaa3; }
  input:focus,select:focus { border-color:#6f9781; outline:2px solid #c7dbcb; outline-offset:1px; }
  .notice { padding:14px 16px; border:1px solid #e1e6d8; background:#f4f6ef; border-radius:8px; font-size:12px; color:#5b695b; line-height:1.7; }
  .notice.success { background:#eef6ef; color:#315c40; border-color:#cfe2d0; }
  .notice.error { background:#fff0ec; color:#953c2e; border-color:#eccbc2; }
  .notice.amber { background:#fff9e9; color:#836b34; border-color:#eee1be; }
  .badge { display:inline-flex; align-items:center; align-self:flex-start; padding:4px 9px; border-radius:5px; font-size:10px; line-height:1.5; font-weight:650; letter-spacing:.25px; color:#626f65; background:#f0f2ec; white-space:nowrap; }
  .badge.green { background:#eaf3e6; color:#466d36; }
  .badge.amber { background:#f9efd7; color:#8d7233; }
  .card { background:#fff; border:1px solid var(--line); border-radius:12px; min-width:0; }
  .form-card { padding:26px; }
  .form-card > p { margin-top:7px; }
  .card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:25px 25px 18px; }
  .form-card > .card-heading { padding:0 0 8px; }
  .actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
  .two-columns { display:grid; grid-template-columns:1fr 1fr; gap:22px; align-items:start; margin-top:24px; }
  .identifier { display:block; font-size:12px; overflow-wrap:anywhere; color:#7a857e; }
  .secret { display:block; padding:17px; border:1px dashed #b8c8b0; background:#f3f7ee; color:#254c3d; border-radius:8px; overflow-wrap:anywhere; font-size:13px; line-height:1.7; user-select:all; }
  .avatar { width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#486045; background:#e9edde; font-size:10px; font-weight:700; flex-shrink:0; }
  .avatar.large { width:48px; height:48px; font-size:15px; }
  .startup { min-height:100vh; display:flex; align-items:center; justify-content:center; gap:16px; color:var(--muted); }
  .auth-page { min-height:100vh; display:grid; grid-template-columns:minmax(390px,48%) 1fr; background:#fff; }
  .auth-story { padding:50px clamp(35px,5.5vw,90px); display:flex; flex-direction:column; align-items:flex-start; min-height:100vh; background:#edf0e5; overflow:hidden; }
  .auth-story > .brand { margin-bottom:100px; }
  .auth-story > .eyebrow { margin-bottom:21px; }
  .auth-story h1 { font-family:Georgia,"Times New Roman",serif; font-size:clamp(38px,3.7vw,58px); line-height:1.12; letter-spacing:-2px; font-weight:400; white-space:pre-line; color:#254737; }
  .auth-story-copy { max-width:365px; margin-top:24px; color:#6c7a6c; line-height:1.85; font-size:14px; }
  .ledger-art { width:100%; max-width:420px; margin:49px 0; background:#f9faf5; border:1px solid #d9e1d0; border-radius:13px; box-shadow:8px 13px 0 #dfe6d5; transform:rotate(-2deg); }
  .art-top { display:flex; align-items:center; gap:9px; border-bottom:1px solid #e2e7db; padding:17px 20px; font-size:11px; font-weight:600; color:#4f6e4a; }
  .art-top svg { margin-left:auto; width:17px; height:17px; }
  .art-dot { width:7px; height:7px; border-radius:50%; background:#7e9a64; }
  .art-row { display:flex; align-items:center; gap:14px; padding:18px 20px; font-size:12px; border-bottom:1px solid #e8ecdf; }
  .art-row:last-child { border:0; }
  .art-number { width:28px; height:28px; display:grid; place-items:center; background:#eaf0df; border-radius:7px; color:#6b8256; font-size:10px; }
  .art-row svg { width:14px; height:14px; margin-left:auto; color:#73905c; }
  .auth-footnote { margin-top:auto; padding-top:15px; font-size:10px; color:#84907e; letter-spacing:.2px; }
  .auth-content { padding:65px clamp(35px,6vw,110px); display:flex; align-items:center; justify-content:center; }
  .auth-panel { width:100%; max-width:385px; display:flex; flex-direction:column; align-items:stretch; gap:15px; }
  .auth-panel .eyebrow { font-size:9px; letter-spacing:1.6px; }
  .auth-title { font-size:34px; font-weight:550; letter-spacing:-1.3px; line-height:1.2; }
  .auth-panel .form { margin:8px 0 0; gap:17px; }
  .auth-panel .form > .button { margin-top:1px; padding:12px; }
  .auth-panel > .text-button { justify-content:center; font-size:11px; }
  .auth-panel .form-card { padding:20px; background:var(--paper); margin:8px 0; }
  .auth-panel .form-card h2 { font-size:15px; }
  .auth-bottom { margin-top:15px; border-top:1px solid var(--line); padding-top:21px; display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:7px; font-size:12px; color:var(--muted); }
  .support-line { text-align:center; font-size:10px; color:#8a948d; margin-top:24px; overflow-wrap:anywhere; }
  .enrollment { max-width:640px; margin:0 auto; padding:45px 24px 65px; display:flex; flex-direction:column; align-items:stretch; gap:23px; }
  .enrollment > .brand { margin-bottom:20px; }
  .enrollment > .card { display:flex; flex-direction:column; gap:18px; }
  .step-label { color:#718268; font-size:10px; font-weight:700; letter-spacing:1.3px; }
  .shell { display:grid; grid-template-columns:230px minmax(0,1fr); min-height:100vh; }
  .sidebar { position:sticky; top:0; height:100vh; overflow-y:auto; padding:30px 17px 23px; display:flex; flex-direction:column; border-right:1px solid #e1e5d9; background:#f1f3ec; }
  .sidebar .brand { font-size:16px; gap:8px; padding-left:9px; }
  .sidebar .brand-mark { width:31px; height:31px; border-radius:9px; font-size:22px; }
  .nav-label { font-size:9px; color:#929b8a; letter-spacing:1.6px; margin:46px 14px 15px; font-weight:650; }
  .navigation { display:flex; flex-direction:column; gap:6px; }
  .nav-item { width:100%; display:flex; align-items:center; gap:12px; border:0; border-radius:7px; padding:12px 14px; background:transparent; color:#74806e; text-align:left; font-size:12px; font-weight:550; }
  .nav-item svg { width:17px; height:17px; }
  .nav-item:hover { background:#e8eddf; color:#344b37; }
  .nav-item.active { background:#e2e9d8; color:#375331; }
  .sidebar-bottom { margin-top:auto; }
  .sidebar-bottom > p { font-size:10px; padding:15px 14px; border-bottom:1px solid #e0e5d6; margin-bottom:12px; }
  .workspace-body { display:flex; flex-direction:column; min-width:0; }
  .topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:82px; padding:20px 42px; border-bottom:1px solid var(--line); background:#fff; }
  .breadcrumb { display:flex; gap:15px; font-size:11px; color:#99a294; }
  .breadcrumb strong { color:#626d5c; font-weight:500; }
  .topbar-tools { display:flex; align-items:center; gap:23px; min-width:0; }
  .tenant-select { border:0; background:#f6f7f1; padding:8px 30px 8px 12px; color:#5b6c53; font-size:11px; max-width:220px; }
  .main { padding:40px 42px 48px; max-width:1500px; width:100%; margin:0 auto; flex:1; }
  .main > [data-errors]:not(:empty) { margin-bottom:20px; }
  .page-heading { display:flex; justify-content:space-between; align-items:center; gap:22px; margin-bottom:31px; }
  .page-heading .eyebrow { font-size:9px; margin-bottom:10px; letter-spacing:1.5px; }
  .page-heading h1 { margin-bottom:11px; }
  .page-heading p { font-size:12px; }
  .page-heading > .button { flex-shrink:0; font-size:11px; }
  .stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:24px; }
  .stat { padding:22px 24px; }
  .stat-top { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:11px; color:#788271; }
  .stat-top svg { width:16px; height:16px; color:#7d9472; }
  .stat-value { display:block; font-size:30px; font-weight:500; letter-spacing:-1px; line-height:1.3; margin:15px 0 7px; color:#2b4232; }
  .stat p { font-size:10px; }
  .overview-grid { display:grid; grid-template-columns:1.6fr 1fr; gap:22px; margin-top:24px; align-items:stretch; }
  .portal-row { display:flex; align-items:center; gap:13px; padding:17px 25px; border-top:1px solid #eff1e9; }
  .portal-row strong { font-size:12px; font-weight:600; }
  .portal-row .small { font-size:10px; overflow-wrap:anywhere; }
  .portal-row .badge { margin-left:auto; align-self:center; }
  .portal-avatar { width:36px; height:36px; flex-shrink:0; border-radius:9px; display:grid; place-items:center; background:#edf0e7; color:#647c54; font-weight:600; font-size:11px; }
  .security-card { display:flex; flex-direction:column; align-items:flex-start; gap:17px; padding:29px; background:#eef2e6; border-color:#dfe5d3; }
  .security-card > svg { width:28px; height:28px; color:#668559; }
  .security-card h2 { font-family:Georgia,serif; font-weight:400; font-size:25px; letter-spacing:-.5px; white-space:pre-line; line-height:1.25; color:#385436; }
  .security-card p { font-size:11px; line-height:1.85; }
  .security-card .text-button { margin-top:auto; font-size:11px; }
  .welcome-banner { border:1px solid #dce5d0; background:#eaf0e1; border-radius:12px; padding:29px; display:flex; align-items:center; gap:24px; }
  .welcome-banner p { font-size:12px; color:#72806c; line-height:1.8; }
  .welcome-icon { border:1px solid #cddbbb; color:#779361; display:grid; place-items:center; width:60px; height:60px; border-radius:50%; font-family:Georgia,serif; font-size:25px; flex-shrink:0; }
  .empty { padding:34px 28px; display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center; }
  .empty h2 { font-size:15px; }
  .empty p { font-size:11px; max-width:300px; line-height:1.8; }
  .empty .button { font-size:11px; margin-top:6px; }
  .empty-icon { display:grid; place-items:center; width:45px; height:45px; background:#f1f4e9; border-radius:12px; color:#80976a; }
  .portal-item { margin-top:18px; border:1px solid var(--line); border-radius:9px; }
  .portal-item .portal-row { padding:15px; border:0; }
  .portal-item .actions { padding:0 15px 15px; }
  .portal-item .portal-avatar { width:30px; height:30px; }
  .member-row { display:flex; align-items:center; gap:18px; padding:22px 0; border-bottom:1px solid #edf0e6; flex-wrap:wrap; }
  .member-row:last-child { border:0; }
  .member-info { display:flex; align-items:center; gap:12px; flex:1; min-width:180px; }
  .member-info strong { font-size:12px; overflow-wrap:anywhere; }
  .member-info code { font-size:9px; }
  .member-controls { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
  .member-controls .field { width:125px; }
  .member-controls select { padding:8px; font-size:11px; }
  .member-controls .field-label { font-size:9px; }
  .member-controls > .button { padding:9px 14px; font-size:11px; }
  .member-controls > div:empty { display:none; }
  .invitation-row,.key-row,.session-row { padding:18px 0; border-bottom:1px solid #edf0e6; display:flex; align-items:center; justify-content:space-between; gap:17px; }
  .invitation-row strong { font-size:12px; overflow-wrap:anywhere; }
  .key-row { flex-wrap:wrap; }
  .session-row > .stack { max-width:80%; }
  .plan-card { max-width:650px; padding:30px; }
  .plan-card > .card-heading { padding:0 0 28px; }
  .plan-name { font-size:35px; font-weight:500; letter-spacing:-1px; margin-bottom:9px; }
  .plan-features { margin:28px 0; padding:23px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:15px; }
  .plan-features p { display:flex; gap:12px; font-size:12px; align-items:center; }
  .plan-features svg { width:16px; height:16px; color:#74915e; }
  .danger-zone { display:flex; justify-content:space-between; align-items:center; gap:25px; padding:26px; margin-top:26px; }
  .danger-zone p { font-size:12px; max-width:600px; }
  .danger-zone .button { flex-shrink:0; font-size:11px; }
  .audit-row { padding:23px 0; display:flex; align-items:flex-start; gap:17px; border-bottom:1px solid #eff1e9; }
  .audit-row strong { text-transform:capitalize; font-size:12px; }
  .audit-dot { width:8px; height:8px; border:2px solid #9caf8a; border-radius:50%; margin-top:6px; flex-shrink:0; }
  .audit-row .identifier { font-size:10px; }
  .profile-card { padding:26px; display:flex; align-items:center; flex-wrap:wrap; gap:20px; }
  .profile-card .stack { margin-right:auto; }
  .profile-card h2 { overflow-wrap:anywhere; }
  .profile-card .badge { align-self:center; }
  .recovery-panel { padding:27px; border-color:#e1cd9d; background:#fffaf0; display:flex; flex-direction:column; gap:16px; margin-bottom:28px; }
  .code-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-width:430px; }
  .code-grid code { padding:9px 13px; background:#fff; border:1px solid #e8dcc2; border-radius:5px; user-select:all; font-size:12px; }
  .workspace-footer { padding:18px 42px 25px; color:#9da595; font-size:9px; }
  .dialog { width:min(620px,calc(100vw - 36px)); max-height:85vh; border:1px solid var(--line); border-radius:14px; padding:28px; box-shadow:0 22px 90px #172f2c40; color:var(--ink); }
  .dialog::backdrop { background:#18282066; backdrop-filter:blur(3px); }
  .dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:23px; }
  .dialog > .stack { gap:16px; }
  .dialog .form-card { margin-top:15px; background:#f7f8f3; }
  .loading { padding:40px 0; color:var(--muted); font-size:13px; }
  .noscript { padding:25px; text-align:center; }
  .section-gap { margin-top:24px; }
  .identity-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin:20px 0; }
  .catalog-row { display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:16px 0; border-bottom:1px solid var(--line); }
  .catalog-row > .stack { flex:1; }
  .catalog-row strong { font-size:12px; }
  .catalog-list { margin-top:15px; }
  .choice-group { min-width:0; padding:14px; border:1px solid var(--line); border-radius:8px; display:flex; flex-direction:column; gap:9px; }
  .choice { display:flex; align-items:flex-start; gap:9px; font-size:12px; overflow-wrap:anywhere; }
  .choice input { width:15px; height:15px; padding:0; margin:2px 0 0; flex-shrink:0; accent-color:var(--green); }
  details > summary { cursor:pointer; color:var(--green); font-weight:600; }
  details > .form-card { margin-top:20px; }
}
@layer responsive {
  @media(min-width:1600px) { .auth-story > .brand { margin-bottom:130px; } .auth-story { padding-top:65px; } }
  @media(max-width:1150px) { .shell { grid-template-columns:205px minmax(0,1fr); } .main { padding:32px 27px; } .topbar { padding:20px 27px; } .sidebar .brand { font-size:14px; } .stats { gap:12px; } .stat { padding:20px 17px; } .stat-value { font-size:26px; } .overview-grid { grid-template-columns:1.25fr 1fr; } .two-columns { gap:17px; } .form-card { padding:23px; } .member-controls .field { width:110px; } }
  @media(max-width:900px) { .auth-page { grid-template-columns:.85fr 1fr; } .auth-story { padding:35px 30px; } .auth-story > .brand { margin-bottom:80px; font-size:16px; } .auth-story h1 { font-size:39px; } .auth-content { padding:45px 30px; } .ledger-art { margin-top:40px; } .art-row { font-size:10px; gap:9px; padding:16px 13px; } .art-top { padding:14px; font-size:10px; } .overview-grid,.two-columns { grid-template-columns:1fr; } .security-card { display:grid; grid-template-columns:32px 1fr; gap:15px 20px; } .security-card h2,.security-card p,.security-card .text-button { grid-column:2; } .security-card .badge { align-self:center; justify-self:start; } .security-card h2 { white-space:normal; } .topbar-tools { gap:12px; } .tenant-select { max-width:170px; } .page-heading { align-items:flex-start; } .danger-zone { flex-direction:column; align-items:flex-start; } }
  @media(max-width:680px) { .auth-page { display:block; } .auth-story { min-height:auto; padding:25px; } .auth-story > .brand { margin:0; } .auth-story > .eyebrow,.auth-story h1,.auth-story-copy,.ledger-art,.auth-footnote { display:none; } .auth-content { padding:40px 25px 50px; } .auth-panel { max-width:420px; } .auth-title { font-size:31px; } .shell { display:block; } .sidebar { position:relative; height:auto; padding:20px 17px 12px; border-right:0; border-bottom:1px solid #dfe5d6; } .sidebar .brand { font-size:17px; padding-left:4px; } .nav-label,.sidebar-bottom > p { display:none; } .navigation { flex-direction:row; overflow-x:auto; margin-top:18px; gap:5px; padding-bottom:3px; } .nav-item { width:auto; flex-shrink:0; padding:9px 11px; gap:7px; font-size:10px; } .nav-item svg { width:15px; height:15px; } .sidebar-bottom { display:flex; margin-top:10px; padding-top:8px; border-top:1px solid #e1e7d8; justify-content:space-between; } .topbar { min-height:65px; padding:14px 20px; gap:10px; } .breadcrumb { gap:8px; font-size:10px; } .breadcrumb > span:first-child { display:none; } .breadcrumb > span:nth-child(2) { display:none; } .avatar { width:29px; height:29px; } .tenant-select { max-width:170px; font-size:10px; } .main { padding:30px 20px; } .page-heading { flex-direction:column; gap:17px; margin-bottom:25px; } h1 { font-size:30px; } .page-heading .eyebrow { font-size:8px; } .stats { gap:9px; } .stat { padding:16px 11px; } .stat-top { font-size:9px; } .stat-top svg { display:none; } .stat-value { font-size:22px; letter-spacing:-.6px; margin:12px 0 8px; overflow-wrap:anywhere; } .stat p { font-size:9px; } .overview-grid { gap:18px; } .card-heading { padding:21px 20px 16px; } .card-heading h2 { font-size:16px; } .portal-row { padding:17px 20px; gap:10px; } .portal-row .badge { font-size:9px; padding:3px 6px; } .form-card { padding:22px; } .welcome-banner { padding:22px; align-items:flex-start; gap:17px; } .welcome-banner h2 { font-size:16px; } .welcome-icon { width:40px; height:40px; font-size:20px; } .welcome-banner p { font-size:11px; } .member-row { gap:14px; } .member-controls { width:100%; } .member-controls .field { flex:1; } .member-controls .button { width:auto; } .member-controls [data-errors]:not(:empty) { order:5; width:100%; } .profile-card { padding:22px; gap:14px; } .profile-card .stack { width:calc(100% - 65px); } .profile-card h2 { font-size:16px; } .plan-card { padding:24px; } .session-row { flex-wrap:wrap; gap:12px; } .session-row > .stack { max-width:100%; } .workspace-footer { padding:10px 20px 22px; } .dialog { padding:22px; } .dialog-heading h2 { font-size:17px; } .dialog-heading .button span { display:none; } .dialog .actions { align-items:stretch; flex-direction:column; } }
  @media(max-width:680px) { .sidebar-bottom { flex-wrap:wrap; gap:3px; } .identity-grid { grid-template-columns:1fr; } }
  @media(prefers-reduced-motion:reduce) { * { transition:none!important; scroll-behavior:auto!important; } }
}
