:root {
  color-scheme: dark;
  --page: #100e15;
  --paper: #18151f;
  --paper-hi: #201b29;
  --line: #352d40;
  --ink: #f7f2fb;
  --muted: #c1b4cb;
  --accent: #ff784a;
  --purple: #c7a9ff;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 77% 0, #241831 0, transparent 39rem), var(--page); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
.site { width: min(calc(100% - 80px), 1260px); min-height: 100svh; margin: auto; display: flex; flex-direction: column; }
.masthead { min-height: 85px; display: flex; gap: 22px; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 850; letter-spacing: -.075em; }
.brand-dot { color: var(--accent); }
.brand-mark { width: 30px; aspect-ratio: 1; border: 1px solid #885536; border-radius: 10px; display: grid; place-items: center; transform: rotate(-9deg); }
.brand-mark i { width: 13px; aspect-ratio: 1; background: var(--accent); transform: rotate(45deg); border-radius: 1px 6px 1px 6px; }
.mast-label { color: var(--muted); font-size: .875rem; border-left: 1px solid var(--line); padding-left: 20px; }
.logout { margin-left: auto; }
main { flex: 1; }
footer { display: flex; justify-content: space-between; margin-top: 42px; padding: 20px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
h1, h2, p { margin: 0; }
button { border-radius: 8px; }
.primary, .ghost, .copy, .address-text { min-height: 42px; padding: 8px 14px; font-weight: 700; }
.primary { color: #220e15; background: var(--accent); border: 1px solid transparent; }
.primary:hover:not(:disabled) { background: #ff916d; }
.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.ghost:hover:not(:disabled) { background: var(--paper-hi); border-color: #695778; }
.boot { padding: 36px 0; color: var(--muted); }

.login-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 55px; padding: clamp(36px, 9vh, 105px) 0 24px; }
.login-copy { min-height: 425px; position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; padding: clamp(30px, 5vw, 72px); background: radial-gradient(ellipse at 90% 90%, #392049, transparent 68%), var(--paper); }
.login-copy h1 { font-size: clamp(4rem, 8vw, 8rem); line-height: .82; letter-spacing: -.09em; font-weight: 840; }
.login-copy h1 em { font-style: normal; color: var(--accent); }
.login-copy p { color: var(--muted); max-width: 29ch; margin-top: 29px; line-height: 1.55; }
.login-panel { border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 52px); background: var(--paper); }
.panel-kicker, .eyebrow { font-family: var(--mono); font-size: .875rem; letter-spacing: .075em; text-transform: uppercase; }
.panel-kicker { color: var(--purple); display: inline-flex; gap: 10px; align-items: center; }
.panel-kicker i { width: 8px; height: 8px; border: 1px solid currentColor; transform: rotate(45deg); }
.login-panel h2 { margin: 15px 0 26px; font-size: 3.25rem; line-height: 1; letter-spacing: -.08em; }
.login-panel label { display: block; margin-bottom: 9px; font-weight: 650; }
.password-field { display: flex; border: 1px solid #514461; border-radius: 10px; background: var(--page); padding: 4px; }
.password-field input { min-width: 0; flex: 1; padding: 10px; background: transparent; color: var(--ink); border: 0; border-radius: 6px; }
.password-field input::placeholder { color: #a69ab2; }
.password-field button { border: 0; padding: 5px 9px; background: var(--paper-hi); color: var(--purple); font-size: .875rem; }
#password-note { margin: 12px 0 19px; font-size: .875rem; color: var(--muted); line-height: 1.5; }
.login-submit { width: 100%; min-height: 48px; }
.error { color: #ffac9a; margin-top: 13px; }
.error:empty { display: none; }

.workspace-title { display: flex; align-items: end; justify-content: space-between; margin: 45px 0 25px; gap: 20px; }
.workspace-title .eyebrow { color: var(--muted); }
.workspace-title h1 { font-size: clamp(3rem, 6.3vw, 6.25rem); line-height: .93; letter-spacing: -.085em; margin-top: 10px; }
.workspace-title h1 span { color: var(--accent); }
#create { min-height: 48px; padding-inline: 17px; }
#create span { margin-right: 6px; font-weight: 500; }
.work-grid { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 2.2fr); gap: 19px; align-items: start; }
.sidebar, .inbox { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; }
.section-top { min-height: 68px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.section-top h2 { font-size: 1.15rem; font-weight: 750; letter-spacing: -.026em; }
.count { font: .875rem var(--mono); color: var(--purple); padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.boxes { max-height: 380px; overflow: auto; padding: 9px; }
.boxes-empty { padding: 12px 9px 16px; color: var(--muted); line-height: 1.4; }
.box { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; text-align: left; padding: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); }
.box:hover, .box[aria-pressed="true"] { border-color: #574668; background: var(--paper-hi); }
.box[aria-pressed="true"] { border-left: 3px solid var(--accent); padding-left: 8px; }
.box strong { display: block; font: 650 .95rem var(--mono); overflow-wrap: anywhere; }
.box small { color: var(--muted); display: block; margin-top: 3px; font-size: .875rem; }
.box > span:last-child:not(:first-child) { color: var(--purple); font: .875rem var(--mono); }
.domain-list { padding: 16px 18px 19px; border-top: 1px solid var(--line); }
.domain-list h3 { margin: 0 0 5px; font-size: .95rem; }
#domain-status { color: var(--muted); font-size: .875rem; }
.domain-list ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.domain-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font: .875rem var(--mono); cursor: pointer; }
.domain-option:has(input:checked) { color: var(--ink); background: var(--paper-hi); }
.domain-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: inherit; }
#domains[aria-busy="true"] .domain-option { cursor: wait; }
.mail { min-width: 0; display: grid; gap: 17px; }
.address { position: relative; isolation: isolate; overflow: hidden; min-height: 221px; display: flex; align-items: center; padding: 25px clamp(18px, 3vw, 40px); background: #ff784a; color: #2b1021; border-radius: 17px; }
.address-content { position: relative; z-index: 1; width: 100%; }
.address .eyebrow { font-weight: 800; }
.address-value { font: 750 clamp(1.2rem, 3vw, 2.35rem)/1.15 var(--mono); letter-spacing: -.055em; overflow-wrap: anywhere; margin: 10px 0 18px; }
.address-actions { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; }
.copy { background: #2b1021; color: #fff1ec; border: 1px solid transparent; }
.copy:hover { background: #441b32; }
.address-text { color: inherit; background: transparent; border: 1px solid #5b263c74; font-size: .875rem; }
.address-text:hover:not(:disabled) { background: #ffad91; }
#address-hint { max-width: 36ch; line-height: 1.45; }
.signal, .login-orbit { position: absolute; pointer-events: none; aspect-ratio: 1; }
.signal { right: -43px; top: 50%; width: 270px; transform: translateY(-50%) rotate(-20deg); color: #512138; opacity: .33; }
.login-orbit { z-index: -1; right: -65px; bottom: -115px; color: #b88aee; width: min(85%, 480px); opacity: .55; transform: rotate(-24deg); }
.orbit { width: 100%; height: 100%; position: relative; border: 1px solid currentColor; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 19px, currentColor 20px, transparent 21px 27px); }
.orbit::before, .orbit::after { content: ""; position: absolute; background: currentColor; top: 50%; left: 0; width: 100%; height: 1px; }
.orbit::after { transform: rotate(90deg); }
.orbit i, .orbit b { position: absolute; display: block; width: 8px; aspect-ratio: 1; transform: rotate(45deg); background: currentColor; }
.orbit i:nth-child(1) { top: 19%; left: 31%; }
.orbit i:nth-child(2) { top: 63%; left: 75%; }
.orbit i:nth-child(3) { top: 76%; left: 37%; }
.orbit b { width: 15px; top: calc(50% - 7px); left: calc(50% - 7px); }
.orbit span { position: absolute; width: 50%; height: 50%; left: 50%; top: 0; border-bottom: 1px solid currentColor; transform-origin: bottom left; transform: rotate(28deg); background: linear-gradient(35deg, currentColor, transparent 62%); opacity: .23; }
.inbox-title { display: flex; align-items: center; gap: 10px; }
.refresh { font-size: .875rem; }
.refresh span { font-size: 1.1rem; margin-right: 3px; }
.inbox-empty { min-height: 209px; padding: 30px 18px; display: grid; place-content: center; justify-items: center; gap: 9px; text-align: center; }
.inbox-empty p { color: var(--muted); line-height: 1.45; }
.empty-icon { width: 34px; height: 23px; border: 1px solid var(--purple); border-radius: 5px; overflow: hidden; margin-bottom: 7px; }
.empty-icon::before { content: ""; display: block; border: solid var(--purple); border-width: 0 1px 1px 0; width: 23px; height: 23px; margin: -14px auto 0; transform: rotate(45deg); }
.message-row { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; gap: 11px; align-items: center; text-align: left; width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 13px 18px; color: var(--ink); background: transparent; }
.message-row:last-child { border-bottom: 0; }
.message-row:hover { background: var(--paper-hi); }
.message-row .unread { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.message-row strong, .message-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-row small, .message-row time { color: var(--muted); font-size: .875rem; }
.message-row small { margin-top: 4px; }

dialog { width: min(720px, calc(100% - 28px)); background: var(--paper); color: var(--ink); border: 1px solid #685677; border-radius: 17px; padding: clamp(17px, 4vw, 30px); max-height: 88svh; }
dialog::backdrop { background: #0a0810dc; }
dialog h2 { font-size: clamp(1.5rem, 4vw, 2.15rem); line-height: 1.1; overflow-wrap: anywhere; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 15px; color: var(--purple); }
#message-meta { display: grid; grid-template-columns: auto 1fr; gap: 5px 15px; color: var(--muted); }
#message-meta dd { margin: 0; overflow-wrap: anywhere; }
.message-body { border-block: 1px solid var(--line); padding: 17px 0; white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.downloads { display: grid; gap: 9px; margin-top: 16px; }
.message-body a, .downloads a { color: var(--purple); overflow-wrap: anywhere; }
#delete-dialog { max-width: 420px; }
#delete-note { color: var(--muted); margin: 12px 0 17px; overflow-wrap: anywhere; line-height: 1.5; }
.dialog-actions { display: flex; gap: 8px; justify-content: end; }
.toast { position: fixed; z-index: 3; bottom: 18px; right: 18px; max-width: min(420px, calc(100vw - 36px)); background: #2b2239; border: 1px solid #775990; border-radius: 9px; padding: 12px 16px; color: var(--ink); box-shadow: 0 8px 28px #0009; }
@media (max-width: 900px) {
  .site { width: calc(100% - 38px); }
  .login-grid { gap: 18px; }
  .login-copy { min-height: 366px; }
}
@media (max-width: 660px) {
  .site { width: calc(100% - 26px); }
  .masthead { min-height: 65px; gap: 13px; }
  .mast-label { padding-left: 12px; }
  .login-grid, .work-grid { grid-template-columns: minmax(0, 1fr); }
  .login-copy { min-height: 250px; padding: 27px; }
  .login-copy h1 { font-size: clamp(3.6rem, 13vw, 5rem); }
  .login-copy p { margin-top: 19px; }
  .login-grid { padding: 21px 0 8px; }
  .sidebar { grid-row: 2; }
  .boxes { max-height: 230px; }
  .workspace-title { margin: 28px 0 20px; gap: 10px; align-items: center; }
  .workspace-title h1 { font-size: clamp(2.5rem, 9vw, 3.6rem); }
  .workspace-title .eyebrow { font-size: .73rem; }
  #create { padding-inline: 10px; font-size: .875rem; }
  #create span { margin-right: 0; }
  .address { min-height: 172px; }
  .signal { width: 190px; right: -55px; opacity: .24; }
  .masthead:has(#logout:not([hidden])) .mast-label { display: none; }
}

@media (max-width: 350px) {
  .site { width: calc(100% - 20px); }
  .workspace-title { flex-wrap: wrap; }
  .address-value { font-size: 1.12rem; }
  .section-top { padding-inline: 12px; }
  .message-row { padding-inline: 12px; }
  footer { gap: 12px; }
}
