/* Sovra Cloud components: the pieces every area uses. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--cont); color: var(--on); font: 400 15px/1.45 var(--font); letter-spacing: .1px; overflow: hidden; -webkit-text-size-adjust: 100%; transition: background .3s linear, color .3s linear; }
button { font: inherit; color: inherit; letter-spacing: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
h1, h2, h3, p { margin: 0; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes inr { from { opacity: 0; transform: translateX(40px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes morph { 0% { border-radius: 50%; transform: rotate(0); } 25% { border-radius: 50% 4px 50% 4px; } 50% { border-radius: 10px; } 75% { border-radius: 50% 50% 50% 4px; } 100% { border-radius: 50%; transform: rotate(360deg); } }

/* State layer: 8% on hover, 12% while pressed */
.sl { position: relative; isolation: isolate; }
.sl::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .2s var(--fx); pointer-events: none; z-index: -1; }
.sl:hover::after { opacity: .08; } .sl:active::after { opacity: .12; }

/* Layout helpers */
.scroll { overflow: auto; min-height: 0; }
.pad { padding: 8px 24px 40px; }
.vh { display: flex; align-items: center; gap: 12px; padding: 18px 24px 10px; flex-wrap: wrap; }
.vh h1 { font-size: 22px; font-weight: 500; line-height: 28px; margin-right: auto; }
.sub { color: var(--on-v); font-size: 13.5px; }
h2.sec { font-size: 22px; font-weight: 500; padding: 28px 4px 12px; }
.acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.only-n { display: none !important; } /* phone-only controls; must beat .ib and .btn */

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 20px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: border-radius .35s var(--spring-fast); }
.btn:active { border-radius: 12px; }
.btn.fill { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--secondary-c); color: var(--on-secondary-c); }
.btn.text { color: var(--primary); padding: 0 12px; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 16px; }
.ib { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: var(--on-v); flex: none; transition: border-radius .35s var(--spring-fast); }
.ib:active { border-radius: 12px; }
.ib[aria-pressed="true"] { background: var(--secondary-c); color: var(--on-secondary-c); }
.seg { display: inline-flex; gap: 2px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; height: 40px; padding: 0 16px; background: var(--high); color: var(--on-v); font-size: 14px; font-weight: 500; border-radius: 8px; transition: border-radius .35s var(--spring-fast), background .2s var(--fx), color .2s var(--fx); }
.seg button:first-child { border-radius: 20px 8px 8px 20px; } .seg button:last-child { border-radius: 8px 20px 20px 8px; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-radius: 20px; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--primary); color: var(--on-primary); font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; white-space: nowrap; border: 1px solid var(--outline-v); color: var(--on-v); }
.chip svg.i { width: 15px; height: 15px; }
.chip.class { border: 0; background: var(--tertiary-c); color: var(--on-tertiary-c); }
.chip.out { border-color: var(--error); color: var(--error); }
.chip.tone { border: 0; background: var(--secondary-c); color: var(--on-secondary-c); }
.chip.act { border-color: var(--primary); color: var(--primary); font-weight: 600; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--outline-v); font-size: 13px; font-weight: 500; color: var(--on-v); display: inline-flex; align-items: center; gap: 6px; }
.chips button[aria-pressed="true"] { background: var(--secondary-c); color: var(--on-secondary-c); border-color: transparent; }
.chips button svg.i { width: 15px; height: 15px; }
.chipin { height: 32px; border-radius: 8px; border: 1px dashed var(--outline); background: none; padding: 0 10px; font-size: 13px; outline: 0; min-width: 190px; }
.chipin:focus { border: 1px solid var(--primary); }

/* Avatars, file letters, dots, tags */
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; background: var(--primary-c); color: var(--on-primary-c); }
.av.t { background: var(--tertiary-c); color: var(--on-tertiary-c); } .av.g { background: var(--calc-bg); color: var(--calc); } .av.o { background: var(--impress-bg); color: var(--impress); }
.av.xs { width: 20px; height: 20px; font-size: 8.5px; } .av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.lg { width: 56px; height: 56px; font-size: 18px; } .av.xl { width: 76px; height: 76px; font-size: 24px; }
.av.sq { border-radius: 12px; }
.av.me { box-shadow: 0 0 0 2px var(--cont), 0 0 0 4px var(--primary); }
.av.ph { background-size: cover !important; background-position: center !important; color: transparent; }
.ft { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; background: var(--writer-bg); color: var(--writer); }
.ft.s { background: var(--calc-bg); color: var(--calc); } .ft.p { background: var(--impress-bg); color: var(--impress); } .ft.d { background: var(--draw-bg); color: var(--draw); }
.ft.mini { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 4px; flex: none; background: var(--dc, var(--primary)); }
.tg { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 7px; background: var(--dbg); color: var(--don); white-space: nowrap; line-height: 1.5; }
.tgs { display: flex !important; gap: 4px; flex-wrap: wrap; margin-top: 4px; overflow: visible !important; }

/* Rows and cards */
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; font-size: 14px; text-align: left; min-width: 0; }
.row .tx { min-width: 0; flex: 1; display: grid; }
.row .tx b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tx span { font-size: 12.5px; color: var(--on-v); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tm { font-size: 12.5px; color: var(--on-v); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .btn.sm { flex: none; }
.row.un .tx b { font-weight: 700; }
.row[aria-selected="true"] { background: var(--secondary-c); color: var(--on-secondary-c); }
.when { width: 52px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.card { background: var(--low); border-radius: 24px; padding: 8px; transition: border-radius .5s var(--spring); min-width: 0; }
.card:hover { border-radius: 32px; }
.card > h3 { font-size: 14px; font-weight: 650; padding: 12px 12px 6px; display: flex; justify-content: space-between; align-items: center; }
.card > h3 span { font-weight: 400; color: var(--on-v); font-size: 12.5px; }
.empty { display: grid; place-content: center; text-align: center; gap: 8px; color: var(--on-v); padding: 48px 24px; }
.empty b { color: var(--on); font-size: 18px; font-weight: 500; }
.note { background: var(--low); border-radius: 20px; padding: 14px 16px; font-size: 13.5px; color: var(--on-v); display: grid; gap: 4px; }
.note b { color: var(--on); font-size: 14px; font-weight: 650; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; align-items: center; }
.kv dt { color: var(--on-v); } .kv dd { margin: 0; }
.cookie { position: absolute; animation: spin 50s linear infinite; }

/* To-dos */
.task .tick { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--outline); display: grid; place-items: center; flex: none; color: transparent; transition: all .35s var(--spring-fast); }
.task .tick svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.task.done .tick { background: var(--primary); border-color: var(--primary); color: var(--on-primary); border-radius: 12px; }
.task .tx b { white-space: normal; }
.task.done .tx b { text-decoration: line-through; color: var(--on-v); font-weight: 400; }

/* Fields and switches */
.field { display: grid; gap: 4px; }
.field > span { font-size: 12.5px; color: var(--on-v); font-weight: 500; }
.field input, .field textarea, .field select { border: 0; color: inherit; font: inherit; outline: 0; background: var(--high); border-radius: 12px; padding: 12px 14px; width: 100%; resize: none; }
/* The app's own drop-down: no browser chrome, a small chevron drawn in the text colour (works in both themes). */
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--high); color: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { background: var(--highest); box-shadow: inset 0 -2px 0 var(--primary); }
.swrow { align-items: center; }
.swrow .tx span { white-space: normal; }
.swt { width: 52px; height: 32px; border-radius: 16px; border: 2px solid var(--outline); background: var(--highest); position: relative; flex: none; transition: background .2s var(--fx), border-color .2s var(--fx); }
.swt::after { content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--outline); transition: all .35s var(--spring-fast); }
[aria-checked="true"] .swt { background: var(--primary); border-color: var(--primary); }
[aria-checked="true"] .swt::after { left: 22px; top: 2px; width: 24px; height: 24px; background: var(--on-primary); }

/* Sheets, scrim, snackbar, loader */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.36); z-index: 50; display: none; }
.scrim.on { display: block; animation: fade .2s var(--fx) both; }
.scrim.clear { background: transparent; }
.sheet { position: fixed; z-index: 60; background: var(--cont); box-shadow: var(--el3); display: none; flex-direction: column; overflow: hidden; }
.sheet.on { display: flex; }
.sheet.right { top: 8px; right: 8px; bottom: 8px; width: min(480px, calc(100vw - 16px)); border-radius: 28px; animation: inr .5s var(--spring) both; }
.sheet header { display: flex; align-items: center; gap: 8px; padding: 14px 12px 8px 22px; }
.sheet header h2 { font-size: 22px; font-weight: 500; margin-right: auto; }
.sheet .in { padding: 4px 22px 22px; overflow: auto; display: grid; gap: 14px; align-content: start; }
.sheet .in h3 { font-size: 14px; font-weight: 650; margin-top: 6px; }
.sheet .in .row { padding-left: 4px; padding-right: 4px; align-items: center; }
.sheet .in .row .tx span { white-space: normal; }
.snack { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--inverse); color: var(--inverse-on); border-radius: 16px; padding: 12px 18px; font-size: 14px; box-shadow: var(--el3); z-index: 70; display: none; max-width: calc(100vw - 32px); }
.snack.on { display: block; animation: rise .35s var(--spring-fast) both; }
.loader { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-c); display: grid; place-items: center; }
.loader i { width: 30px; height: 30px; background: var(--primary); animation: morph 1s linear infinite; }

@media (max-width: 860px) {
  .only-n { display: grid !important; }
  .pad { padding: 4px 12px 32px; } .vh { padding: 14px 14px 8px; }
  .vh .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .snack { bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; animation-iteration-count: 1 !important; } }

/* Sample content, labelled (17 Nov 2026): a part that is not running on this server says so. */
.chip.samp { height: 22px; padding: 0 8px; margin-left: 6px; border: 0; background: var(--tertiary-c); color: var(--on-tertiary-c); font-size: 11.5px; font-weight: 600; vertical-align: middle; }
.note.samp-note { margin: 12px 0; border: 1px dashed var(--outline-v); }
.samp-line { padding: 4px 16px 0; color: var(--on-v); }

/* A part that is not running is hidden, whatever display the element normally has. */
.dock nav button[hidden], #newmenu button[hidden] { display: none !important; }
/* Read by a screen reader, not shown (21 Nov 2026 accessibility pass). */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
