@font-face { font-family: "Bricolage"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kalam"; src: url(fonts/kalam-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --wall: #3f3cd9;
  --wall-tint: #eeeeff;
  --ink: #1d1b2e;
  --ink-soft: #4a4763;
  --muted: #625f7a;
  --line: #dedcf0;
  --amber: #ffc43d;
  --pink: #ff9ccb;
  --sky: #8fd8ff;
  --mint: #a6eebf;
  --screen: #ffffff;
  --side: #f2f1fa;
  --display: "Bricolage", system-ui, sans-serif;
  --body: "Atkinson", system-ui, sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: #fff; color: var(--ink); font: 18px/1.6 var(--body); }
a { color: inherit; text-underline-offset: 3px; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.bar :focus-visible, .chin :focus-visible, .foot :focus-visible, .page-head :focus-visible { outline-color: var(--amber); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
.sc { font: 600 0.9em var(--mono); background: rgb(255 255 255 / .55); border-radius: 6px; padding: 0 .25em; white-space: nowrap; }

/* ---- Header and footer (all pages) ---- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 800 23px var(--display); letter-spacing: -0.01em; text-decoration: none; }
.bar nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.bar nav a { text-decoration: none; font-size: 16px; color: var(--ink-soft); padding: 4px 0; border-bottom: 2px solid transparent; }
.bar nav a:hover, .bar nav a[aria-current=page] { color: var(--ink); border-color: var(--amber); }
.bar nav .lang { display: flex; align-items: center; gap: 6px; padding-left: clamp(12px, 3vw, 28px); border-left: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.bar nav .lang a { font-size: 14px; font-weight: 700; }
.bar nav .lang [aria-current] { font-weight: 700; color: var(--ink); }
@media (max-width: 640px) { .bar { flex-wrap: wrap; row-gap: 6px; } .bar nav { width: 100%; } .bar nav .lang { margin-left: auto; } }
.foot { display: flex; gap: 24px; flex-wrap: wrap; padding: 28px clamp(16px, 4vw, 40px) 40px; background: var(--ink); color: #c9c7dd; font-size: 15px; }
.foot span { margin-right: auto; }

/* ---- Buttons ---- */
.btn-ink, .btn-install { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px var(--body); border: 0; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; text-decoration: none; transition: transform .15s ease-out, background-color .15s; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #33304d; }
.btn-ink:active, .btn-install:active { transform: translateY(1px); }
.btn-quiet { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; font: inherit; font-size: 15px; cursor: pointer; color: var(--ink); }
.btn-quiet:hover { border-color: var(--muted); }
.btn-install { background: var(--amber); color: var(--ink); }
.btn-install.is-soon { background: none; color: var(--amber); border: 2px dashed var(--amber); cursor: default; padding: 8px 16px; }
.btn-big { font-size: 18px; padding: 14px 24px; border-radius: 12px; }

/* ---- Sticky notes ---- */
.note { --c: var(--amber); position: relative; display: block; background: var(--c); color: var(--ink); border: 0; border-radius: 3px 3px 6px 3px; text-align: left;
  background-image: linear-gradient(to bottom, rgb(0 0 0 / .07), transparent 18%);
  box-shadow: 0 1px 1px rgb(20 16 60 / .12), 0 14px 22px -12px rgb(20 16 60 / .55);
  transform: rotate(var(--tilt, 0deg)); font: inherit; }
button.note { cursor: pointer; transition: transform .2s cubic-bezier(.2, .8, .3, 1.2), box-shadow .2s; }
button.note:hover { transform: rotate(0deg) translateY(-4px) scale(1.02); box-shadow: 0 1px 1px rgb(20 16 60 / .12), 0 22px 28px -12px rgb(20 16 60 / .55); }
.note-name { display: block; font: 700 21px/1.3 var(--hand); }
.note-sc { display: inline-block; font: 600 14px var(--mono); background: rgb(255 255 255 / .6); border-radius: 5px; padding: 1px 6px; }

/* ---- Hero: a monitor on a wall ---- */
.desk { background: var(--wall); padding: clamp(40px, 6vw, 72px) clamp(16px, 8vw, 150px) clamp(72px, 9vw, 120px); }
.monitor { position: relative; max-width: 1080px; margin: 0 auto; background: var(--ink); border-radius: 26px; padding: 16px 16px 0;
  box-shadow: 0 2px 0 #3a3757 inset, 0 40px 60px -30px rgb(10 8 40 / .7); }
.monitor::after { content: ""; position: absolute; left: 50%; bottom: -46px; width: 170px; height: 46px; translate: -50% 0;
  background: linear-gradient(#2a2741, #1d1b2e); clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); }
.screen { background: var(--screen); border-radius: 12px; min-height: min(620px, calc(100vh - 200px)); display: flex; }
/* Notes are stuck half on the bezel, half on the wall. */
.note-hero { position: absolute; z-index: 3; left: -64px; top: -40px; width: min(400px, 40%); padding: 26px 26px 24px; }
.note-hero h1 { font-size: clamp(36px, 3.9vw, 54px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
.note-hero .sc { background: rgb(255 255 255 / .7); }
.note-hero p { margin: 0; font-size: 17px; line-height: 1.5; color: #3a3420; max-width: 34ch; }
.rim { list-style: none; margin: 0; padding: 0; }
.rim li { position: absolute; z-index: 2; width: 172px; }
.rim-1 { left: -84px; top: 410px; }
.rim-2 { left: -56px; top: 548px; }
.rim-3 { right: -78px; top: -34px; }
.rim-4 { right: -92px; top: 150px; }
.rim-5 { right: 28%; bottom: -44px; }
.rim .note { width: 100%; padding: 12px 14px 14px; min-height: 92px; display: grid; gap: 6px; align-content: start; justify-items: start; }
.rim .note-name { font-size: 19px; }
.note.peel { animation: peel .52s cubic-bezier(.55, 0, .75, .2) forwards; z-index: 5; }
.note.back { animation: back .42s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes peel {
  25% { transform: translateY(-14px) rotate(calc(var(--tilt) - 7deg)) scale(1.06); }
  100% { transform: translate(var(--dx), var(--dy)) rotate(10deg) scale(.35); opacity: 0; }
}
@keyframes back { from { opacity: 0; transform: translateY(10px) rotate(var(--tilt)) scale(.92); } }

.chat { flex: 1; display: grid; grid-template-rows: auto 1fr auto; position: relative; min-width: 0; }
.chat-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 16px 110px 16px max(22px, calc(min(400px, 40%) - 30px)); border-bottom: 1px solid var(--line); }
.chat-title { font: 700 17px var(--display); }
.chat-hint { font-size: 14px; color: var(--muted); }
.chat-log { padding: 22px 110px 22px max(22px, calc(min(400px, 40%) - 30px)); display: flex; flex-direction: column; gap: 12px; overflow: auto; max-height: 420px; }
.bubble { margin: 0; max-width: 85%; background: var(--side); padding: 12px 16px; border-radius: 16px 16px 16px 4px; font-size: 17px; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--wall); color: #fff; border-radius: 16px 16px 4px 16px; }
.composer { position: relative; margin: 0 22px 22px 120px; }
.composer textarea { width: 100%; resize: none; border: 2px solid var(--line); border-radius: 16px; padding: 14px 64px 14px 16px; font: 17px/1.5 var(--body);
  color: var(--ink); background: #fff; min-height: 120px; max-height: 260px; field-sizing: content; }
.composer textarea:focus { outline: none; border-color: var(--wall); box-shadow: 0 0 0 4px rgb(63 60 217 / .15); }
.composer textarea::placeholder { color: #67637f; }
.send { position: absolute; right: 12px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; display: grid; place-items: center; }
.send svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.send:hover { background: var(--wall); }

.form-pop { position: absolute; left: 120px; right: 22px; bottom: 168px; z-index: 4; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 50px -18px rgb(20 16 60 / .45); padding: 18px; display: grid; gap: 12px; animation: pop .22s cubic-bezier(.2, .8, .3, 1); }
.form-pop[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.form-title { margin: 0; font: 700 17px var(--display); white-space: pre; }
.form-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 12px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 14px; color: var(--muted); }
.field input[type=text], .field select, .field textarea { font: 16px var(--body); padding: 8px 10px; border: 1px solid #c9c6e0; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.field-check { display: flex; align-items: center; gap: 8px; flex-direction: row-reverse; justify-content: flex-end; }
.field-check input { width: 20px; height: 20px; accent-color: var(--wall); }
.field-check label { font-size: 15px; color: var(--ink); }
.form-preview { margin: 0; background: var(--wall-tint); border-radius: 10px; padding: 10px 12px; font-size: 15px; white-space: pre-wrap; max-height: 120px; overflow: auto; color: var(--ink-soft); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }

.chin { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 6px 16px 150px; color: #c9c7dd; font-size: 15px; }
.chin-note { margin-right: auto; }
.chin-link { color: #fff; font-weight: 700; }

/* ---- Templates board ---- */
.board { background: var(--wall-tint); padding: clamp(64px, 8vw, 110px) clamp(16px, 4vw, 40px); }
.board-head { max-width: 1160px; margin: 0 auto 40px; }
.board h2, .sites h2, .own h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 800; }
.board-head p { margin: 0 0 26px; max-width: 58ch; color: var(--ink-soft); font-size: 19px; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs button { --c: var(--amber); font: 700 17px var(--body); padding: 9px 18px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; transition: background-color .15s; }
.tabs button:hover { background: color-mix(in srgb, var(--c) 35%, #fff); }
.tabs button[aria-pressed=true] { background: var(--c); }
.notes { list-style: none; padding: 0; margin: 0 auto; max-width: 1160px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 34px 30px; }
.note-board { width: 100%; height: 100%; min-height: 250px; padding: 20px 20px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.note-board .note-name { font-size: 25px; }
.note-body { font-size: 15px; line-height: 1.5; color: #2e2b3f; white-space: pre-line; }
.note-body mark { background: rgb(255 255 255 / .65); color: var(--ink); border-radius: 4px; padding: 0 3px; }
.note-try { margin-top: auto; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* ---- Facts ---- */
.facts { background: var(--amber); padding: clamp(56px, 7vw, 96px) clamp(16px, 4vw, 40px); display: grid; gap: 22px; }
.fact { max-width: 1160px; width: 100%; margin: 0 auto; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; color: #3a3420; }
.fact strong { font: 800 1.35em/1 var(--display); letter-spacing: -0.02em; color: var(--ink); margin-right: .25em; }

/* ---- Sites ---- */
.sites { padding: clamp(64px, 8vw, 110px) clamp(16px, 4vw, 40px) 40px; max-width: 1240px; margin: 0 auto; }
.sites ul { list-style: none; padding: 0; margin: 14px 0 20px; display: flex; flex-wrap: wrap; gap: 10px 34px; }
.sites li { font: 800 clamp(24px, 3vw, 34px) var(--display); letter-spacing: -0.02em; color: var(--wall); }
.sites p { color: var(--muted); margin: 0; }

/* ---- Make your own ---- */
.own { padding: 56px clamp(16px, 4vw, 40px) clamp(72px, 9vw, 120px); max-width: 1240px; margin: 0 auto; }
.own ol { list-style: none; padding: 0; margin: 28px 0 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.own li { display: flex; gap: 16px; align-items: flex-start; }
.own h3 { margin: 4px 0 4px; font-size: 22px; letter-spacing: -0.01em; }
.own p { margin: 0; color: var(--ink-soft); }
.note-mini { --tilt: -4deg; flex: none; width: 52px; height: 52px; display: grid; place-items: center; background: var(--c); font: 700 26px var(--hand); border-radius: 3px;
  transform: rotate(var(--tilt)); box-shadow: 0 10px 16px -10px rgb(20 16 60 / .6); }
.own .sc { background: var(--wall-tint); }

/* ---- Reading pages: guide and privacy ---- */
.page-head { background: var(--wall); color: #fff; padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 64px); }
.page-head > div { max-width: 1160px; margin: 0 auto; }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 16px; }
.page-head p { margin: 0; font-size: clamp(19px, 2vw, 22px); max-width: 46ch; color: #e4e3ff; }
.page-head .updated { font-size: 16px; color: #c8c6ff; }
.reading { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: 24px; padding-top: 48px; font-size: 16px; }
.toc p { margin: 0 0 12px; font: 700 15px var(--display); color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.toc a { display: block; color: var(--ink-soft); text-decoration: none; padding: 5px 10px; border-radius: 8px; }
.toc a:hover { background: var(--wall-tint); color: var(--ink); }
.toc a.active { background: var(--wall-tint); color: var(--ink); font-weight: 700; }
.prose { max-width: 70ch; padding: 40px 0 88px; }
.prose section { scroll-margin-top: 24px; }
.prose h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.02em; margin: 56px 0 14px; font-weight: 800; }
.prose section:first-child h2, .prose > h2:first-child { margin-top: 8px; }
.prose h3 { font-size: 21px; margin: 32px 0 6px; }
.prose p, .prose li, .prose dd { color: #343148; }
.prose ul { padding-left: 22px; }
.prose .callout { background: var(--wall-tint); border-left: 3px solid var(--wall); border-radius: 8px; padding: 14px 18px; }
.prose code { font: 0.86em var(--mono); background: var(--wall-tint); padding: 2px 6px; border-radius: 5px; color: var(--ink); overflow-wrap: anywhere; }
.prose kbd { font: 700 15px var(--mono); background: #fff; border: 1px solid #c9c6e0; border-bottom-width: 3px; border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.prose .steps { padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.prose .steps li { counter-increment: step; position: relative; padding-left: 52px; min-height: 36px; }
.prose .steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 34px; height: 34px; background: var(--amber); font: 700 19px var(--hand);
  border-radius: 3px; transform: rotate(-4deg); box-shadow: 0 8px 12px -8px rgb(20 16 60 / .6); }
.prose .steps li:nth-child(2)::before { background: var(--pink); transform: rotate(3deg); }
.prose .steps li:nth-child(3)::before { background: var(--sky); }
.prose .steps li:nth-child(4)::before { background: var(--mint); transform: rotate(2deg); }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 17px; }
.prose th { text-align: left; font: 700 15px var(--display); color: var(--muted); padding: 0 14px 10px 0; border-bottom: 2px solid var(--ink); }
.prose td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose td:first-child { white-space: nowrap; }
.prose .ref td:first-child { white-space: normal; width: 46%; }
.example { margin: 24px 0 28px; background: var(--wall-tint); border-radius: 16px; padding: 20px 22px; display: grid; gap: 10px; }
.example figcaption { font-size: 15px; color: var(--muted); font-weight: 700; }
.example pre { margin: 0 0 6px; font: 15px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.example .result { font: 17px/1.5 var(--body); background: var(--amber); border-radius: 3px 3px 6px 3px; padding: 14px 16px; margin: 0; transform: rotate(-.6deg);
  box-shadow: 0 12px 18px -12px rgb(20 16 60 / .55); }
.faq dt { font: 700 19px var(--display); margin-top: 22px; }
.faq dd { margin: 6px 0 0; }

@media (max-width: 900px) {
  .desk { padding: 28px 14px 72px; }
  .monitor { padding: 10px 10px 0; border-radius: 20px; }
  .note-hero { position: relative; left: auto; top: auto; width: auto; margin: -38px -4px 12px -6px; }
  .rim { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; margin: 0 -14px 14px; }
  .rim li { position: static; width: calc(33% - 8px); min-width: 104px; }
  .rim li:nth-child(even) { margin-top: 6px; }
  .rim .note { min-height: 70px; padding: 9px 10px 10px; }
  .rim .note-name { font-size: 16px; }
  .screen { min-height: 0; }
  .chat-top, .chat-log { padding-left: 14px; padding-right: 14px; }
  .chat-log { max-height: 260px; }
  .form-pop { bottom: 150px; left: 10px; right: 10px; }
  .composer { margin: 0 12px 12px; }
  .chin { padding-left: 6px; }
  .chat-hint { display: none; }
  .guide { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; padding-top: 24px; }
  .toc ol { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
