/* Tramo web. Same family as the apps: black on white, 3px corners (from the family base, familia.css, loaded first), big light titles,
   concrete content and a glass frame (what floats over the page is glass). */
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --bg: var(--ec-bg); --card: var(--ec-bg); --ink: var(--ec-ink); --ink2: var(--ec-ink-2); --muted: var(--ec-muted); --hair: var(--ec-hairline); --soft: var(--ec-soft); --softer: var(--ec-softer);
  --side: #fafafa; --onink: var(--ec-on-ink); --radius: var(--ec-radius);
  --ev: #4F6BED; --al: #EE5A3B; --tk: #17A06B; --evbg: #EEF1FE; --albg: #FDECE8; --tkbg: #E3F5EC; --altx: #C2462C; --tktx: #0E7A50;
  --danger: var(--ec-danger); --notag: #A6A6A6;
  --glass: var(--ec-glass); --glass-edge: var(--ec-glass-edge);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --side: #101010;
  --ev: #7C92F7; --al: #F4724F; --tk: #34BE84; --evbg: #1F2645; --albg: #3A211B; --tkbg: #16311F; --altx: #FF9F87; --tktx: #6CD9A8;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --side: #101010;
  --ev: #7C92F7; --al: #F4724F; --tk: #34BE84; --evbg: #1F2645; --albg: #3A211B; --tkbg: #16311F; --altx: #FF9F87; --tktx: #6CD9A8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
#root { min-height: 100vh; }
body { font: 400 15px/1.45 var(--ec-sans); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------- pieces ---------- */
.lab { font-size: 11.5px; font-weight: 700; letter-spacing: .9px; color: var(--muted); text-transform: uppercase; }
.btn { height: 48px; padding: 0 18px; background: var(--ink); color: var(--onink); font-weight: 700; font-size: 14px; letter-spacing: .8px; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:disabled { background: var(--muted); cursor: default; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.small { height: 34px; font-size: 12.5px; letter-spacing: .6px; padding: 0 12px; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: none; }
.icon { width: 40px; height: 40px; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.icon svg { width: 16px; height: 16px; }
.icon.on { background: var(--ink); color: var(--onink); }
.seg { display: inline-flex; box-shadow: inset 0 0 0 1.5px var(--ink); }
.seg button { height: 40px; padding: 0 14px; font-weight: 600; font-size: 13.5px; letter-spacing: .4px; }
.seg button.on { background: var(--ink); color: var(--onink); }
.sq { width: 8px; height: 8px; display: inline-block; flex: none; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .6px; padding: 3px 7px; text-transform: uppercase; white-space: nowrap; }
.pill.event { color: var(--ev); background: var(--evbg); } .pill.alarm { color: var(--altx); background: var(--albg); } .pill.task { color: var(--tktx); background: var(--tkbg); }
.check { width: 22px; height: 22px; border: 2px solid var(--tk); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.check.on { background: var(--tk); color: #fff; }
.check svg { width: 13px; height: 13px; }
.muted { color: var(--muted); }
.err { color: var(--danger); font-weight: 600; font-size: 13.5px; }
.glass { background: var(--glass); backdrop-filter: blur(6px) saturate(180%); -webkit-backdrop-filter: blur(6px) saturate(180%); box-shadow: inset 0 0 0 1px var(--glass-edge); }

/* ---------- sign in ---------- */
.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
.gate-art { padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--hair); }
.gate-art .word { display: flex; align-items: center; gap: 22px; }
.gate-art .word svg { width: clamp(64px, 9vw, 120px); height: auto; }
.gate-art h1 { margin: 0; font-size: clamp(72px, 13vw, 200px); font-weight: 700; letter-spacing: -.05em; line-height: .85; }
.gate-art p { margin: 0; max-width: 34em; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--ink2); }
.gate-form { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.gate-form h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.field { display: flex; flex-direction: column; gap: 6px; }
.under { height: 48px; border: 0; border-bottom: 1.5px solid var(--muted); background: transparent; font-size: 18px; outline: none; }
.under:focus { border-bottom: 2px solid var(--ink); }
.big { height: 56px; font-size: 26px; font-weight: 500; letter-spacing: 3px; }
.links { display: flex; gap: 18px; font-size: 14px; font-weight: 700; }
.links button:disabled { color: var(--muted); cursor: default; }
@media (max-width: 860px) { .gate { grid-template-columns: 1fr; } .gate-art { border-right: 0; border-bottom: 1px solid var(--hair); gap: 24px; } }

/* ---------- app frame ---------- */
.app { height: 100vh; display: grid; grid-template-columns: 290px minmax(0, 1fr) 360px; }
.app.week { grid-template-columns: 290px minmax(0, 1fr); }
.app.week .right { display: none; }
.side { border-right: 1px solid var(--hair); padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 24px; overflow: auto; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.mhead { display: flex; justify-content: space-between; align-items: center; }
.mhead b { font-size: 12.5px; letter-spacing: .9px; font-weight: 700; text-transform: uppercase; }
.mhead button { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 10px; text-align: center; }
.month .dw { font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.month button { height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; gap: 3px; }
.month button.out { color: var(--muted); opacity: .55; }
.month button.today { font-weight: 700; }
.month button.sel { background: var(--ink); color: var(--onink); opacity: 1; }
.month button.inweek { background: var(--soft); }
.month button.sel.inweek { background: var(--ink); }
.pips { display: flex; gap: 2px; height: 4px; }
.pips i { width: 4px; height: 4px; display: block; }
.tags button { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 14.5px; padding: 5px 0; text-align: left; }
.tags button em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 13px; }
.tags button.off { opacity: .4; }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side .acct { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.side .acct span { color: var(--muted); font-weight: 500; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .credit { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.side .credit span { display: block; font-variant-numeric: tabular-nums; letter-spacing: .3px; }

.main { overflow: auto; position: relative; }
.top { position: sticky; top: 0; z-index: 5; padding: 18px 40px 0; }
.top.glass { box-shadow: none; }
.top .bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.top h1 { margin: 0; font-size: clamp(48px, 5.4vw, 76px); font-weight: 400; letter-spacing: -.035em; line-height: .9; white-space: nowrap; }
.top h1 b { font-weight: 700; }
.top h1 small { font-size: 14px; font-weight: 700; letter-spacing: 1px; margin-left: 14px; vertical-align: .9em; text-transform: uppercase; }
.top .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.body { padding: 0 40px 64px; }

/* day */
.next { margin-top: 22px; background: var(--ink); color: var(--onink); padding: 18px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 18px; cursor: pointer; }
.next small { font-size: 11.5px; font-weight: 700; letter-spacing: .9px; opacity: .7; text-transform: uppercase; }
.next h2 { margin: 6px 0 0; font-size: 24px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next .t { font-size: 56px; letter-spacing: -.03em; line-height: .9; }
.next .in { grid-column: 2; justify-self: end; font-size: 12px; font-weight: 700; background: var(--onink); color: var(--ink); padding: 3px 7px; }
.strip { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.strip button { background: var(--soft); padding: 11px 14px; display: flex; align-items: center; gap: 10px; font-size: 15px; text-align: left; width: 100%; }
.strip button span:last-child { margin-left: auto; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.sec { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; padding-bottom: 6px; }
.sec h3 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.01em; }
.cnt { background: var(--ink); color: var(--onink); font-size: 13px; font-weight: 700; padding: 2px 7px; }
.row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--hair); align-items: center; width: 100%; text-align: left; }
.row:hover { background: linear-gradient(90deg, transparent, var(--soft) 30%, transparent); }
.row .tm { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row .tm small { display: block; font-size: 13.5px; font-weight: 400; color: var(--muted); }
.row .ti { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row .end { display: flex; align-items: center; gap: 10px; }
.row.past { opacity: .5; }
.done .ti, .done .n, .done > span:not(.check) { text-decoration: line-through; }
.row.done, .chk.done, .ev.done { opacity: .55; }
.any { margin-top: 26px; }
.chk { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 17px; font-weight: 500; width: 100%; text-align: left; }
.chk .meta { margin-left: auto; color: var(--muted); font-size: 13px; }
.empty { margin-top: 40px; color: var(--muted); font-size: 17px; }
.right { border-left: 1px solid var(--hair); padding: 22px 24px; overflow: auto; background: var(--side); display: flex; flex-direction: column; gap: 4px; }
.day { padding: 12px 0; border-top: 1px solid var(--ink); }
.day .dh { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 700; width: 100%; text-align: left; }
.day .dh span { font-weight: 400; color: var(--muted); font-size: 13px; }
.it { display: flex; gap: 10px; font-size: 14.5px; padding: 5px 0; align-items: center; width: 100%; text-align: left; }
.it .h { width: 60px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.it .x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syncline { margin-top: auto; padding-top: 16px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.syncline .sq { width: 6px; height: 6px; background: var(--tk); }
.syncline.off .sq { background: var(--muted); }

/* week */
.cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: calc(100vh - 140px); }
.col { border-right: 1px solid var(--hair); padding: 14px 12px 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col:last-child { border-right: 0; }
.col.today { background: var(--side); }
.ch { display: flex; align-items: baseline; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); width: 100%; text-align: left; }
.ch b { font-size: 30px; font-weight: 400; letter-spacing: -.02em; }
.ch span { font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--muted); text-transform: uppercase; }
.col.today .ch b { font-weight: 700; }
.ad { background: var(--soft); padding: 6px 8px; font-size: 13px; display: flex; gap: 6px; align-items: center; width: 100%; text-align: left; overflow: hidden; }
.ad span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev { padding: 6px 0 8px; border-bottom: 1px solid var(--hair); width: 100%; text-align: left; }
.ev .h { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ev .n { font-size: 14.5px; font-weight: 500; margin-top: 2px; overflow-wrap: anywhere; }
.tk { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 4px 0; width: 100%; text-align: left; }
.tk .check { width: 16px; height: 16px; }
.tk .check svg { width: 10px; height: 10px; }
.addday { margin-top: auto; color: var(--muted); font-size: 13px; text-align: left; opacity: 0; }
.col:hover .addday { opacity: 1; }

/* sheets (detail, forms, options): glass panel from the right */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.18); z-index: 20; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 21; display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--hair); }
.sheet.wide { width: min(760px, 100vw); }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; }
.sheet header h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.sheet .content { flex: 1; overflow: auto; padding: 0 24px 24px; }
.sheet footer { padding: 10px 24px 20px; display: flex; gap: 10px; }
.sheet footer .btn { flex: 1; white-space: nowrap; }
.sheet footer .btn.danger { flex: 0 0 auto; }
.panel { box-shadow: inset 0 0 0 1px var(--ink); }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; border-bottom: 1px solid var(--hair); }
.prow:last-child { border-bottom: 0; }
.prow .pt { flex: 1; min-width: 0; }
.prow .pt b { display: block; font-weight: 500; font-size: 15.5px; }
.prow .pt small { display: block; color: var(--muted); font-size: 12.5px; }
.block { margin-top: 22px; }
.block > .lab { display: block; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 12px; box-shadow: inset 0 0 0 1px var(--ink); display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.chip.on { background: var(--ink); color: var(--onink); }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.box { height: 40px; padding: 0 10px; border: 0; background: var(--soft); font-size: 15px; }
select.box { padding-right: 28px; }
textarea.box { height: auto; min-height: 90px; padding: 10px; width: 100%; resize: vertical; }
.title-in { width: 100%; height: 56px; border: 0; border-bottom: 1.5px solid var(--ink); font-size: 24px; font-weight: 500; background: transparent; outline: none; }
.title-in:focus { border-bottom-width: 3px; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--softer); position: relative; flex: none; }
.switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .18s; }
.switch.on { background: var(--ink); } .switch.on i { left: 22px; background: var(--onink); }
.detail h3 { margin: 6px 0 4px; font-size: 30px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; overflow-wrap: anywhere; }
.detail .when { font-size: 16px; color: var(--ink2); }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; margin-top: 18px; font-size: 15px; }
.kv dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--onink); padding: 14px 18px; display: flex; gap: 18px; align-items: center; min-width: 320px; max-width: 90vw; }
.toast small { display: block; opacity: .75; font-size: 13px; }
.toast button { margin-left: auto; font-weight: 700; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: var(--onink); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 1180px) { .app { grid-template-columns: 260px minmax(0, 1fr); } .right { display: none; } .app.week { grid-template-columns: 260px minmax(0, 1fr); } }
@media (max-width: 860px) {
  .app, .app.week { grid-template-columns: 1fr; height: auto; }
  .side { border-right: 0; border-bottom: 1px solid var(--hair); }
  .side .tags, .side .month-wrap { display: none; }
  .top { padding: 14px 16px 0; } .body { padding: 0 16px 48px; }
  .top .bar { flex-direction: column-reverse; align-items: stretch; gap: 16px; }
  .top .tools { flex-wrap: nowrap; justify-content: space-between; }
  .top .tools .seg { margin-right: auto; }
  .next h2 { white-space: normal; font-size: 21px; }
  .next .t { font-size: 44px; }
  .cols { grid-template-columns: 1fr; }
  .col { border-right: 0; border-bottom: 1px solid var(--hair); }
}

/* Corners: the family's 3px (familia.css) on what stands alone. Segment options and the week band stay square; the corner goes on the whole. */
.btn, .icon, .seg, .pill, .check, .glass, .month button.sel, .next, .strip button, .cnt, .ad, .panel, .chip, .box, .toast { border-radius: var(--radius); }
.seg { overflow: hidden; }
.seg button, .month button.inweek:not(.sel) { border-radius: 0; }
