/* Ciclei: light paper, black ink, marker colours for subjects. One sans (Geist), Geist Mono for numbers. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/Geist.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/GeistMono.woff2) format('woff2'); }

:root {
  --paper: #fbfaf6; --white: #fff; --ink: #141414; --ink2: #4b4b4b; --mute: #8a8780; --line: #e6e2d9; --wash: #f3f0e8;
  --mark: #f4c430; --final: #fdeeb8; --ok: #1f7a46; --bad: #b42318;
  --r: 14px; --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.mono { font-family: var(--mono); font-feature-settings: 'tnum'; }
.small { font-size: 14px; color: var(--ink2); }
.mute { color: var(--mute); }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.nav.lined { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand svg { width: 24px; height: 24px; }
.nav nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--ink2); }
.nav nav a:hover { color: var(--ink); }
.nav nav a.btn, .nav nav a.btn:hover { color: #fff; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 550; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s ease, opacity .15s; white-space: nowrap; }
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: var(--wash); }
.btn.small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }
.link:hover { color: var(--ink); }
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 550; color: var(--ink2); }
input[type=text], input[type=email], input[type=date], input[type=number], select, textarea, .input {
  width: 100%; border: 1.5px solid var(--line); background: var(--white); border-radius: 10px; padding: 11px 13px; font-size: 16px; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.err { color: var(--bad); font-size: 14px; min-height: 0; }
.err:empty { display: none; }

/* the edital sheet (the landing's and the builder's input) */
.sheet { position: relative; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(20,20,20,.35); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px dashed var(--line); font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.sheet-body { position: relative; }
.sheet textarea { display: block; border: 0; border-radius: 0 0 var(--r) var(--r); background: transparent; resize: none; height: 190px; padding: 14px 16px; font: 400 14px/1.6 var(--mono); position: relative; z-index: 1; }
.sheet textarea:focus { border: 0; }
.ghost-text { position: absolute; inset: 0; padding: 0 16px; font: 400 14px/1.6 var(--mono); color: #6f6c66; overflow: hidden; pointer-events: none; white-space: pre-wrap; word-break: break-word; }
.ghost-text::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: linear-gradient(var(--white), transparent); z-index: 1; }
.ghost-in { padding: 14px 0; transition: transform .7s cubic-bezier(.3,.7,.2,1); }
.ghost-text::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(transparent, var(--white)); }
.hl { position: relative; color: var(--ink); font-weight: 600; background-image: linear-gradient(var(--c), var(--c)); background-repeat: no-repeat; background-size: 0% 78%; background-position: 0 60%; transition: background-size .7s cubic-bezier(.3,.7,.2,1); border-radius: 2px; }
.hl.on { background-size: 100% 78%; }

/* the wheel */
.wheel { position: relative; aspect-ratio: 1; }
.wheel svg { width: 100%; height: 100%; overflow: visible; }
.wheel .seg { transition: opacity .5s ease, transform .5s cubic-bezier(.3,.7,.2,1); transform-origin: 50% 50%; }
.wheel .seg.off { opacity: 0; transform: scale(.94); }
.wheel .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.wheel .mid b { font-size: clamp(22px, 3.2vw, 34px); font-weight: 600; letter-spacing: -0.03em; display: block; }
.wheel .mid span { font-size: 13px; color: var(--ink2); }
.legend { display: grid; gap: 7px; font-size: 14px; }
.legend .row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.legend i, .chip { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--c); flex: none; }
.legend .row span:last-child { color: var(--ink2); font-family: var(--mono); font-size: 13px; }

/* a week */
.week { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.week-head h3 { font-size: 18px; }
.week-head span { font-size: 13px; color: var(--ink2); }
.day { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--wash); }
.day:last-child { border-bottom: 0; }
.day .d { font-weight: 600; font-size: 14px; line-height: 1.25; }
.day .d small { display: block; font-weight: 400; color: var(--mute); font-size: 12px; }
.items { display: grid; gap: 7px; min-width: 0; }
.it { display: grid; grid-template-columns: 11px 1fr auto; gap: 9px; align-items: start; font-size: 14px; }
.it .chip { margin-top: 5px; }
.it > span { min-width: 0; }
.it b { font-weight: 600; }
.it em { font-style: normal; color: var(--ink2); display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it .m { font-family: var(--mono); font-size: 12.5px; color: var(--mute); padding-top: 1px; }
.revs { display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: 12.5px; color: var(--ink2); }
.revs span { display: inline-flex; align-items: center; gap: 5px; }
.revs .chip { width: 7px; height: 7px; }
.sim { background: var(--ink); color: #fff; border-radius: 9px; padding: 8px 12px; font-size: 14px; font-weight: 550; }
.rest { color: var(--mute); font-size: 14px; }
.exam { background: var(--mark); border-radius: 9px; padding: 8px 12px; font-weight: 600; }

/* sections */
.sec { padding: 96px 0; }
.sec h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; }
.sec .lead { font-size: 18px; color: var(--ink2); margin-top: 14px; max-width: 560px; }
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--ink2); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: flex-start; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--ink2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* dialogs */
.dlg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(20,20,20,.35); padding: 16px; }
.dlg .box { width: min(420px, 100%); background: var(--white); border-radius: 18px; padding: 26px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); display: grid; gap: 14px; }
.dlg h3 { font-size: 22px; }
.dlg form { display: grid; gap: 12px; }
.dlg .x { justify-self: end; margin: -10px -10px 0 0; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--mute); }
.or { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* legal pages */
.doc { max-width: 720px; padding: 56px 0 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--ink2); margin: 0 0 10px; }
.doc ul { padding-left: 22px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 60; max-width: calc(100% - 32px); }

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .sec { padding: 64px 0; }
  .day { grid-template-columns: 58px 1fr; padding: 11px 14px; gap: 10px; }
  .week-head { padding: 12px 14px; flex-direction: column; gap: 2px; }
  .nav nav { gap: 14px; font-size: 14px; }
  .nav nav a.btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
