.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.site-head { position: sticky; top: 0; z-index: 10; background: var(--head-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.head-nav { display: flex; gap: 22px; margin-left: 12px; }
.head-nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.head-nav a:hover { color: var(--ink); }
.lang-pick { margin-left: auto; }
.lang-pick .select { min-height: 36px; padding: 4px 8px; width: auto; font-weight: 700; font-size: 14px; }
.head-actions { display: flex; gap: 8px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: 56px; align-items: center; padding: 72px 0 88px; }
.hero h1 { font-size: clamp(40px, 5vw, 66px); font-weight: 800; letter-spacing: -0.035em; line-height: .98; font-variation-settings: 'opsz' 96; }
.lead { font-size: 19px; color: var(--ink-2); margin-top: 22px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 17px; }
.hero-note { margin-top: 14px; color: var(--ink-3); font-size: 15px; }

/* The demo board: the one loud thing on the page */
.demo-board { margin: 0; background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--r-panel); padding: 18px; box-shadow: 10px 10px 0 var(--hard-shadow); }
.tray { display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin-bottom: 14px; border: 1.5px dashed var(--line); border-radius: 10px; min-height: 64px; }
.tray-label { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.tray-done { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--go); animation: fadein .4s 2.3s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.tray-card { color: var(--on-magnet); display: grid; min-width: 0; padding: 7px 12px; border-radius: var(--r-magnet); background: var(--magnet); box-shadow: var(--shadow-magnet); line-height: 1.25; animation: pickup 1.1s .6s cubic-bezier(.5, 0, .6, 1) both; }
.tray-card strong { font-size: 15px; }
.tray-card span { font-size: 13px; }

.board-grid { display: grid; grid-template-columns: 76px repeat(10, minmax(0, 1fr)); row-gap: 6px; font-size: 13px; }
.bg-week { font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding: 0 0 2px 4px; border-left: 1.5px solid var(--line); white-space: nowrap; overflow: hidden; }
.bg-day { color: var(--ink-3); font-weight: 700; padding: 0 0 4px 4px; border-left: 1px solid var(--line-2); }
.bg-day.wk2 { border-left: 1.5px solid var(--line); }
.bg-name { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; }
.bg-name i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.bg-track { grid-column: 2 / 12; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); column-gap: 3px; height: 34px; padding: 3px 0; border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--board) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%); }
.mag { grid-row: 1; display: flex; align-items: center; padding: 0 8px; border-radius: var(--r-magnet); background: var(--c); color: var(--on-magnet); font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-magnet); min-width: 0; }
.mag-away { background: repeating-linear-gradient(135deg, var(--absence-a) 0 6px, var(--absence-b) 6px 12px); color: var(--ink-2); box-shadow: none; }
.mag-drop { transform-origin: left center; animation: place .8s 1.45s cubic-bezier(.2, .9, .3, 1.15) both; }
.mag-drop.d2 { animation-delay: 1.6s; }

@keyframes pickup {
  0% { transform: none; opacity: 1; }
  35% { transform: translateY(-6px) rotate(-2deg); box-shadow: 0 14px 20px -8px rgba(24, 33, 47, .4); }
  100% { transform: translateY(70px) scale(.9); opacity: 0; }
}
@keyframes place { from { transform: scaleX(.08); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }

/* "Take a look inside": alternating text and screenshot rows, one theme switch for all */
.showcase { padding: 24px 0 96px; }
.showcase-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 18px; border-radius: 7px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow-sm); }
.tour { display: grid; gap: 72px; }
.tour-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.tour-row:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.tour-row:nth-child(even) .tour-shot { order: -1; }
.tour-text h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.tour-text p { margin-top: 12px; font-size: 17.5px; color: var(--ink-2); max-width: 30em; }
.tour-shot { margin: 0; }
.tour-shot img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 22px 48px -26px rgba(24, 33, 47, .5); }
.tour.is-dark .tour-shot img { border-color: #2E3846; }

/* Sections */
section h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.025em; }
.section-lead { margin-top: 12px; font-size: 18px; color: var(--ink-2); max-width: 38em; }

.trades { background: var(--band-bg); color: #fff; padding: 64px 0; }
.trades .section-lead { color: var(--band-muted); }
.trade-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 28px 0 0; }
.trade-list li { padding: 9px 16px; border: 1.5px solid var(--band-line); border-radius: 999px; font-weight: 700; }
.trade-list li:last-child { border-style: dashed; color: var(--band-muted); }

.features { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; padding: 96px 0; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; margin: 0; }
.feature-list dt { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.feature-list dt i { width: 22px; height: 12px; border-radius: 3px; background: var(--c); box-shadow: var(--shadow-magnet); flex: none; }
.feature-list dd { margin: 8px 0 0; color: var(--ink-2); }

.how { background: var(--surface); border-block: 1px solid var(--line); padding: 88px 0; }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; margin: 40px 0 0; }
.steps li { counter-increment: step; padding: 0 28px 0 0; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 20px; background: var(--surface); position: relative; z-index: 1; }
.steps li::after { content: ''; position: absolute; top: 22px; left: 44px; right: 0; border-top: 2px dashed var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 22px; margin-top: 18px; }
.steps p { color: var(--ink-2); margin-top: 8px; max-width: 26em; }

.plans { padding: 96px 0; }
.plan-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin-top: 36px; align-items: start; }
.plan { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 22px; display: grid; gap: 14px; }
.plan h3 { font-size: 24px; }
.price { color: var(--ink-2); }
.price strong { font-family: var(--font-display); font-size: 32px; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; margin-right: 2px; }
.plan ul { margin: 0; padding: 0 0 0 20px; color: var(--ink-2); display: grid; gap: 6px; }
.plan .btn { margin-top: 6px; }
.plan-featured { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--magnet); }
.plan-flag { justify-self: start; color: var(--on-magnet); background: var(--magnet); padding: 2px 10px; border-radius: var(--r-magnet); font-weight: 700; font-size: 14px; }

.site-foot { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink-3); flex-wrap: wrap; }

/* Auth modal */
.auth-modal { width: min(440px, calc(100vw - 32px)); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--board); border-radius: 10px; padding: 4px; }
.auth-tabs button { border: 0; background: transparent; padding: 8px; border-radius: 7px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.auth-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow-sm); }
.auth-modal[data-mode="login"] [data-only]:not([data-only~="login"]) { display: none; }
.auth-modal[data-mode="signup"] [data-only]:not([data-only~="signup"]) { display: none; }
.auth-modal[data-mode="forgot"] [data-only]:not([data-only~="forgot"]) { display: none; }
.auth-modal[data-mode="reset"] [data-only]:not([data-only~="reset"]) { display: none; }
.auth-modal[data-mode="sent"] [data-only]:not([data-only~="sent"]) { display: none; }
.auth-msg { margin: 0 0 4px; line-height: 1.55; color: var(--ink-2); }
.auth-modal[data-mode="sent"] .auth-msg { color: var(--ink); font-size: 16px; }
.forgot-link { margin: -4px 0 0; font-size: 14px; }
.forgot-link a { color: var(--ink-2); }
.invite-banner { background: var(--banner-bg); border: 1.5px solid var(--magnet); border-radius: 10px; padding: 10px 14px; }

@media (max-width: 1200px) and (min-width: 961px) {
  .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 64px; gap: 40px; }
  .features { grid-template-columns: 1fr; gap: 32px; padding: 72px 0; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid .plan:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .tour { gap: 48px; }
  .tour-row, .tour-row:nth-child(even) { grid-template-columns: 1fr; gap: 16px; }
  .tour-row:nth-child(even) .tour-shot { order: 0; }
  .head-nav { display: none; }
  .head-inner { gap: 10px; }
  .head-actions [data-auth="login"] { display: none; }
  .head-actions .btn-ghost { padding: 0 8px; }
  .feature-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li::after { display: none; }
  .plan-grid { grid-template-columns: 1fr; }
  .demo-board { padding: 12px; box-shadow: 6px 6px 0 var(--hard-shadow); }
  .board-grid { grid-template-columns: 56px repeat(10, minmax(0, 1fr)); font-size: 11px; }
  .bg-day { font-size: 0; }
  .bg-day::first-letter { font-size: 11px; }
  .mag { font-size: 10.5px; padding: 0 5px; }
}

@media (max-width: 480px) {
  .site-head .logo { font-size: 0; gap: 0; }
  .lang-pick .select { font-size: 13px; padding: 4px 6px; }
  .head-actions .btn { padding: 0 12px; font-size: 14px; }
  .hero h1 { font-size: 38px; }
  .hero-cta .btn { width: 100%; }
  .tray { flex-wrap: wrap; gap: 8px; }
  .tray-done { margin-left: 0; }
  .plan-grid { grid-template-columns: 1fr; }
}

/* Legal pages */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal p { line-height: 1.6; color: var(--ink-2); margin: 0 0 12px; }
.legal .lead { font-size: 18px; color: var(--ink); }
.legal-date { color: var(--ink-3) !important; font-size: 14px; margin-top: 8px !important; }
.legal-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.legal-table { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; }
.legal-table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.legal-table th { background: var(--board); font-weight: 700; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table code { font-size: 14px; white-space: nowrap; }
.auth-accept { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.auth-accept input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.auth-accept a { color: var(--marker); }
@media (max-width: 700px) { .legal-nav { display: none; } }

/* Plan cards: all the same height with the buttons on one line. On wide screens the popular
   plan reaches further down, carrying its flag and shadow below the others. */
.plan-grid { align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan ul { flex: 1; align-content: start; }
.plan .btn { margin-top: 6px; }
.plan-featured .plan-flag { order: -1; align-self: flex-start; }
@media (min-width: 1201px) {
  .plan-grid { padding-bottom: 56px; }
  .plan-featured { margin-bottom: -56px; padding-bottom: 78px; }
  .plan-featured .plan-flag { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; }
}

/* Plan cards and screenshots respond to hover */
.plan, .tour-shot img { cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
#codeField[hidden] { display: none; }

/* Registration closed (set in the control center) */
.signup-closed { display: none; padding: 6px 0 4px; }
.signup-closed h3 { margin: 0 0 6px; font-size: 18px; }
.signup-closed p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.auth-modal.closed[data-mode="signup"] .signup-closed { display: block; }
.auth-modal.closed[data-mode="signup"] .modal-body > :not(.auth-tabs):not(.signup-closed):not(.invite-banner) { display: none; }
.auth-modal.closed[data-mode="signup"] .modal-foot { display: none; }
