/* Shared page rhythm. Keep the existing Lineca/Switzer identity and dense data
   tables, while giving headings, forms and actions a consistent breathing space. */
:root { --page-gap:24px; --card-padding:24px; --section-gap:20px; }
.view { padding-bottom:64px; }
.mast { padding-top:32px; padding-bottom:8px; }
.mast-left { gap:12px; }
.mast h1 { line-height:1.15; }
.mast .why { max-width:72ch; line-height:1.6; }
/* An empty (hidden) summary band must not erase the heading-to-content gap. */
.mast + .board,
.mast + .band:not(:has(*)) + .board { margin-top:var(--page-gap); }
.band { margin-block:20px 24px; padding-block:18px; }
.board { gap:var(--section-gap); }
.board > p { margin-block:0; }
.board-kicker { margin:20px 0 12px; line-height:1.5; }
.board > .board-kicker { margin:12px 0 -8px; }
.board > .board-kicker:first-child { margin-top:0; }
.board > h2 { margin:12px 0 -8px; font:500 22px/1.3 var(--font-d); letter-spacing:-.02em; }
.board > h2:first-child { margin-top:0; }
.help { font-size:13px; line-height:1.6; }
.why { line-height:1.6; }
.sheet.pad { padding:var(--card-padding); }
.sheet.pad > :first-child { margin-top:0; }
.sheet.pad > :last-child { margin-bottom:0; }
.sheet-head, .sheet.pad .sheet-head { margin-bottom:16px; line-height:1.4; }
.sheet-head h2, .sheet.pad > h2 { font:600 16px/1.4 var(--font-b); letter-spacing:-.01em; }
.sheet.pad > h2 { margin:0 0 16px; }
.sheet.pad > :where(p, .why, .note, .mcard, .form, .field-row, .actions, .kv, .keycard, details) + :where(p, .form, .field-row, .actions, .kv, .keycard, details, .btn) { margin-top:16px; }
.sheet.pad > ul { margin-block:0; padding-left:20px; }
.sheet.pad > ul > li + li { margin-top:8px; }
.sheet.pad > ul > li { line-height:1.6; }
.form { gap:18px; }
.form > .help { margin:0; }
.form .field { gap:8px; }
.field > label, .field:not(.ex-bar .field) > span { font-size:13px; line-height:1.4; }
.field .help { margin:0; }
.form-foot { margin-top:6px; padding-top:20px; flex-wrap:wrap; }
.field-row, .actions { gap:12px; }
.checkline { align-items:flex-start; gap:10px; line-height:1.6; }
.checkline input { flex:none; margin-top:4px; }
/* Transaction review and account details use balanced label/value rows. */
.kv { gap:12px 24px; line-height:1.55; }
.kv dd { min-width:0; overflow-wrap:anywhere; }
.keycard { margin-block:20px; }
.keycard .field-row, .sheet.pad .kv + .field-row { margin-top:20px; }
#exitReview, #withdrawalReview { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
#exitReview > .board-kicker, #withdrawalReview > .board-kicker { margin-top:0; }
.sheet.pad > form.inline { display:block; margin-top:16px; }
.sheet.pad form > .table-scroll + .btn { margin-top:20px; }
.choice { gap:20px; }
.choice .c { padding:var(--card-padding); gap:16px; }
.choice .c h2 { margin:0; font:500 24px/1.25 var(--font-d); letter-spacing:-.02em; }
.choice .c .btn { margin-top:auto; }
.choice .c .why { margin-bottom:4px; }
.account-navigation { gap:4px; margin-block:20px 24px; }
.account-navigation a { padding:12px 14px; line-height:1.4; }
.account-table td { line-height:1.6; }
.account-actions { line-height:1.7; }
.account-actions a, .account-actions button { margin-block:4px; }
.notification-row { padding:24px; }
.notification-content p { margin-top:12px; }
/* Keep precision disclosures separate from both the values and wallet tools. */
.balance-overview + details { margin-top:12px; font-size:13px; line-height:1.6; }
.balance-overview + details > :not(summary) { margin-top:12px; }
.workspace-tools { padding-top:12px; line-height:1.6; }
.bstat i, .stats i { font-size:12px; line-height:1.5; margin-top:4px; }
/* Explorer uses the same section-heading scale. */
.chain-explorer h2 { font:500 22px/1.3 var(--font-d); letter-spacing:-.02em; }
/* Security and sign-in pages retain their narrower reading measure. */
.identity-page { margin-block:40px; }
.identity-page h1 { line-height:1.2; }
.identity-page .kicker + h1 { margin-top:12px; }
.identity-page > p { margin-block:0 16px; }
.security-panel { padding:var(--card-padding); margin-block:20px; }
.security-panel .form-actions { margin-bottom:0; }
.identity-page .identity-form { margin-top:20px; }
.auth-entry .form { margin-top:28px; }
.identity-page .form-actions { gap:12px; }
.identity-page .help, .auth-entry .help { font-size:13px; line-height:1.6; }
.identity-page form p { margin-block:16px; }
.identity-page .identity-back { margin-top:28px; padding-top:20px; }
@media (max-width:960px) {
  .view { padding-inline:24px; }
  .side { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; }
  .side .brand { grid-area:1 / 1; margin:0; }
  .side .side-cta { grid-area:1 / 2; justify-self:end; }
  .side .mobile-account-toggle { grid-area:2 / 1; justify-self:start; }
  .shell .side > .theme-control { grid-area:2 / 2; flex-basis:auto; margin:0; padding:0; }
  .side .sidenav { grid-area:3 / 1 / auto / -1; }
  .side .sidebar-account { grid-area:4 / 1 / auto / -1; width:100%; max-width:none; }
}
@media (max-width:760px) {
  .account-navigation { gap:0; }
  .account-navigation a { padding:12px 8px; font-size:14px; }
}
@media (max-width:560px) {
  :root { --page-gap:24px; --card-padding:20px; --section-gap:18px; }
  .view { padding-inline:20px; padding-bottom:40px; }
  .mast { padding-top:24px; gap:20px; }
  .mast h1 { font-size:30px; }
  .sheet-head { gap:10px; }
  .board > h2 { font-size:20px; }
  .choice .c h2 { font-size:22px; }
  .kv { grid-template-columns:minmax(0,1fr); gap:6px; }
  .kv dd { margin-bottom:12px; }
  .kv dd:last-child { margin-bottom:0; }
  .account-navigation { gap:0; }
  .account-navigation a { padding:10px 12px; font-size:13px; }
  .notification-row { padding:20px; }
  .identity-page { margin-block:24px; }
  .identity-page h1 { font-size:30px; }
  .public-header { flex-wrap:wrap; gap:16px; }
  .public-header nav { flex-wrap:wrap; gap:12px 18px; }
  /* Avoid iOS focus zoom and keep form text legible on narrow screens. */
  .field:not(.ex-bar .field) input, .field:not(.ex-bar .field) select,
  .field textarea { font-size:16px; }
}
/* Vesting separates its disclosure, progress bar and withdrawal action. */
.sheet.pad .bstats + details { margin-top:20px; font-size:13px; line-height:1.6; }
.vesting-progress { margin-block:20px; }
.sheet.pad > h2.board-kicker { margin:24px 0 12px; font:600 11px/1.5 var(--font-b); letter-spacing:.12em; }

/* A compact account menu: workspace identity, actions, then personal preferences. */
.workspace-selector { position:relative; margin:0 0 16px; min-width:0; }
.workspace-selector > summary { list-style:none; cursor:pointer; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--white); }
.workspace-selector > summary::-webkit-details-marker { display:none; }
.workspace-selector > summary:hover { background:var(--fog); }
.workspace-current { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.workspace-current strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 13px/1.5 var(--font-b); }
.workspace-selector small { display:block; font:400 11px/1.4 var(--font-b); color:var(--mute); margin-top:2px; }
.workspace-chevron { flex:none; color:var(--mute); transition:transform 160ms ease; }
.workspace-selector[open] .workspace-chevron { transform:rotate(180deg); }
.workspace-options { position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:30; max-height:calc(100dvh - 170px); overflow-y:auto; padding:5px; background:var(--white); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px rgb(0 0 0 / .10); }
.workspace-list { max-height:160px; overflow-y:auto; }
.workspace-options a { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; padding:6px 9px; border-radius:5px; text-decoration:none; color:var(--ink); font:400 12px/1.5 var(--font-b); }
.workspace-list a > span:first-child { min-width:0; }
.workspace-list strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:500 12px/1.5 var(--font-b); }
.workspace-list small { font-size:10px; }
.workspace-options a:hover, .workspace-options a[aria-current] { background:var(--fog); }
.workspace-check { flex:none; color:var(--ink); font-size:12px; }
.workspace-settings, .workspace-profile { border-top:1px solid var(--line); margin-top:5px; padding-top:5px; }
.workspace-options p { margin:6px 9px; font:400 11px/1.5 var(--font-b); color:var(--mute); }
.workspace-identity .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.workspace-identity > span:last-child { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px; border-top:1px solid var(--line); margin-top:5px; padding:5px 4px 0; }
.workspace-footer .theme-control { gap:4px; font-size:11px; }
.workspace-footer .theme-control > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.workspace-footer .theme-control select { min-width:72px; min-height:32px; padding:4px 6px; border:0; background:transparent; }
.workspace-footer form { margin:0; }
.workspace-footer button { min-height:32px; padding:6px; border-radius:5px; font:400 12px/1.5 var(--font-b); color:var(--mute); }
.workspace-footer button:hover { color:var(--ink); background:var(--fog); }
.workspace-selector summary:focus-visible, .workspace-options a:focus-visible, .workspace-footer button:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; }
@media (max-width:960px) {
  .side .workspace-selector { grid-area:2 / 1 / auto / -1; margin:0; }
  .side .sidenav { grid-area:3 / 1 / auto / -1; }
  .workspace-options a, .workspace-footer button, .workspace-footer .theme-control select { min-height:40px; }
}

/* Refined workspace rows: clear names, one primary action, consistent targets. */
.workspace-name > strong, .workspace-name > .help { display:block; }
.workspace-name > .help { margin-top:4px; font-size:11px; color:var(--mute); overflow-wrap:anywhere; }
.workspace-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.workspace-table .workspace-actions a { display:inline-flex; align-items:center; justify-content:center; min-height:40px; margin:0; padding:8px 12px; border-radius:8px; color:var(--ink); font:500 13px/1.4 var(--font-b); text-decoration:none; }
.workspace-table .workspace-actions a:not(.workspace-open):hover { background:var(--fog); }
.workspace-table .workspace-actions .workspace-open { background:var(--ink); color:var(--white); }
.workspace-table .workspace-actions .workspace-open:hover { background:color-mix(in srgb, var(--ink) 88%, var(--white)); }
.workspace-actions a:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
/* Multiline form controls follow the same surface, radius and focus treatment. */
.field textarea { width:100%; min-height:112px; padding:12px 13px; box-sizing:border-box; border:1px solid var(--line); border-radius:10px; background:var(--white); color:var(--ink); font:400 14px/1.6 var(--font-b); resize:vertical; }
.field textarea:focus-visible { outline:2px solid var(--blue); outline-offset:1px; border-color:var(--blue); }
@media (max-width:560px) {
  .workspace-table .workspace-actions { margin-top:8px; }
  .field textarea { font-size:16px; }
}

/* The menu animates in both directions; native details remains the no-JS fallback. */
.workspace-selector > .workspace-options { animation:none; }
.workspace-selector.is-closing .workspace-chevron { transform:none; }
.workspace-selector > summary, .workspace-options a, .workspace-footer button {
  transition:background-color 140ms var(--ease), color 140ms var(--ease);
}

/* One left edge throughout the signed-in app, including identity and errors. */
.shell:not(.nosidebar) { --page-inset:32px; }
.shell:not(.nosidebar) > .maincol { padding:0; }
.shell:not(.nosidebar) .view { margin-inline:0; width:100%; padding-inline:var(--page-inset); }
.shell:not(.nosidebar) .maincol > :is(.identity-page, .error-page) {
  margin:0; padding:36px var(--page-inset) 64px; width:100%; max-width:704px;
}
.shell:not(.nosidebar) .identity-page .auth-entry { margin-inline:0; }
.identity-page > :is(.identity-page, .error-page) { margin:0; padding:0; max-width:none; }
.messages { margin:24px 32px 0; padding:0; list-style:none; max-width:960px; }
.messages li { margin:0 0 12px; padding:14px 16px; border:1px solid var(--line); border-radius:8px; background:var(--fog); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.messages .warning { color:var(--ink); }
.toastbox .tst { line-height:1.5; }
@media (max-width:960px) {
  .shell:not(.nosidebar) { --page-inset:24px; }
  .messages { margin-inline:24px; }
}
@media (max-width:560px) {
  .shell:not(.nosidebar) { --page-inset:20px; }
  .shell:not(.nosidebar) .maincol > :is(.identity-page, .error-page) { padding-top:24px; padding-bottom:40px; }
  .messages { margin-inline:20px; }
}

/* Compact secondary actions share a visible control surface across the app. */
.linkbtn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:32px; padding:6px 12px; margin:0; border:1px solid var(--line); border-radius:8px; background:var(--white); color:var(--ink); font:500 13px/1.4 var(--font-b); letter-spacing:normal; text-decoration:none; vertical-align:middle; }
.linkbtn:hover { background:var(--fog); border-color:var(--mute); text-decoration:none; }
.linkbtn:disabled { opacity:.55; cursor:wait; }
.linkbtn[hidden] { display:none; }
.live-read-status { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; }
.live-read-status > p { margin:0; }

.billing-preferences { display:grid; gap:16px; min-width:0; margin:8px 0 0; padding:20px 0 0; border:0; border-top:1px solid var(--line); }
.billing-preferences legend { padding:0 12px 0 0; font:600 14px/1.4 var(--font-b); }
