/* ===========================================================
   Clarity Board — click-through demos (home page tour, template pages).
   A deep purple band; inside it a simulated screen (light, like the real
   Calendar), a caption, controls and the list of steps. Played by demo.js.
=========================================================== */

/* the page is deep purple too: the band sits darker, edged top and bottom */
.demo-band {
  border-top: 1px solid rgba(241, 238, 255, 0.1);
  border-bottom: 1px solid rgba(241, 238, 255, 0.1);
  --db-bg: #120F27;
  --db-surface: #221D46;
  --db-ink: #F1EEFF;
  --db-soft: #BDB6E6;
  --db-line: rgba(241, 238, 255, 0.14);
  --db-accent: #B6A8FF;
  background: var(--db-bg);
  color: var(--db-ink);
}
.demo-band .section-head h2 { color: var(--db-ink); }
.demo-band .section-head p { color: var(--db-soft); }
.demo-band .eyebrow { color: var(--yellow); }

.demo { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .demo { grid-template-columns: minmax(0, 1fr); } }
.demo-main { display: grid; gap: 12px; min-width: 0; }

.demo-stage { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); color: #1F2438; font-family: "Inter", system-ui, sans-serif; font-size: 13px; line-height: 1.35; }
@media (max-width: 640px) { .demo-stage { aspect-ratio: auto; } }
.demo-stage .scene { position: absolute; inset: 0; padding: 0; opacity: 0; transition: opacity .35s ease; pointer-events: none; overflow: hidden; }
.demo-stage .scene.on { opacity: 1; }
@media (max-width: 640px) { .demo-stage .scene { position: relative; display: none; min-height: 470px; } .demo-stage .scene.on { display: block; } }

.demo-cursor { position: absolute; width: 22px; height: 22px; left: 60%; top: 40%; z-index: 20; pointer-events: none; transition: left .9s cubic-bezier(.4, 0, .2, 1), top .9s cubic-bezier(.4, 0, .2, 1), opacity .3s; }
.demo-cursor svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.demo-cursor .ring { position: absolute; left: -9px; top: -9px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #5B3FC4; opacity: 0; }
.demo-cursor.click .ring { animation: demo-ring .6s ease-out; }
@keyframes demo-ring { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .demo-cursor { transition: none; } .demo-cursor.click .ring { animation: none; } .demo-stage .scene { transition: none; } }

.demo-caption { background: var(--db-surface); border: 1px solid var(--db-line); border-radius: 14px; padding: 14px 18px; min-height: 104px; }
.demo-caption .step { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--db-accent); }
.demo-caption h3 { color: var(--db-ink); font-size: 22px; margin: 2px 0 4px; }
.demo-caption p { color: var(--db-soft); margin: 0; font-size: 15px; max-width: 70ch; }

.demo-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-controls button { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--db-line); background: transparent; color: var(--db-ink); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.demo-controls button.play { background: var(--yellow); color: var(--indigo-deep); border-color: var(--yellow); min-width: 84px; }
.demo-controls button:focus-visible, .demo-list button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.demo-bar { flex: 1 1 140px; min-width: 120px; height: 6px; border-radius: 999px; background: var(--db-line); overflow: hidden; }
.demo-bar i { display: block; height: 100%; width: 0; background: var(--yellow); }

.demo-list { display: grid; gap: 2px; }
.demo-list button { font: inherit; font-size: 14px; text-align: left; border: 0; background: transparent; color: var(--db-soft); padding: 8px 10px; border-radius: 10px; cursor: pointer; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.demo-list button b { color: var(--db-accent); font-variant-numeric: tabular-nums; }
.demo-list button.on { background: var(--db-surface); color: var(--db-ink); }
.demo-list button:hover { color: var(--db-ink); }
@media (max-width: 900px) { .demo-list { display: none; } }

/* ---- inside the screen: Google Calendar and the panel ---- */
.dm-cal { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 290px; background: #fff; }
@media (max-width: 640px) { .dm-cal { grid-template-columns: 1fr; min-height: 470px; } .dm-grid { display: none !important; } }
.dm-grid { display: grid; grid-template-rows: 38px 1fr; border-right: 1px solid #E4E2EC; min-width: 0; }
.dm-days { display: grid; grid-template-columns: 34px repeat(5, 1fr); font-size: 11px; color: #5F6368; align-items: end; padding-bottom: 4px; border-bottom: 1px solid #E4E2EC; }
.dm-days span { text-align: center; }
.dm-days .today { color: #1A73E8; font-weight: 700; }
.dm-cols { position: relative; display: grid; grid-template-columns: 34px repeat(5, 1fr); }
.dm-cols > div { position: relative; border-right: 1px solid #EEECF4; }
.dm-ev { position: absolute; left: 3px; right: 3px; border-radius: 5px; color: #fff; font-size: 10px; line-height: 1.25; padding: 3px 5px; overflow: hidden; transition: height .8s ease, opacity .4s; }
.dm-ev b { display: block; font-weight: 600; }
.dm-ev.g { background: #0B8043; } .dm-ev.b { background: #039BE5; } .dm-ev.p { background: #8E24AA; } .dm-ev.r { background: #D50000; }
.dm-ev.y { background: #F6BF26; color: #3B2C00; } .dm-ev.k { background: #616161; } .dm-ev.o { background: #F4511E; }
.dm-ev.live { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0B8043; }
.dm-ev.new { animation: dm-pop .6s ease both; }
@keyframes dm-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dm-ev.new { animation: none; } }
.dm-now { position: absolute; left: 0; right: 0; height: 2px; background: #EA4335; }
.dm-pop { position: absolute; z-index: 3; left: 18%; top: 18%; width: 46%; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .35); padding: 10px 12px; font-size: 12px; }
.dm-pop b { display: block; font-size: 14px; margin: 2px 0; }
.dm-pop .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.dm-panel { background: #fff; display: grid; grid-template-rows: auto 1fr; min-width: 0; position: relative; border-left: 1px solid #E4E2EC; }
.dm-head { background: #5B3FC4; color: #fff; padding: 10px 14px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.dm-body { padding: 10px 14px; display: grid; gap: 7px; align-content: start; overflow: hidden; font-size: 12.5px; }
.dm-sec { font-size: 11px; font-weight: 800; color: #3C4043; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.dm-plus { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: #202124; color: #fff; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.dm-grp { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; }
.dm-grp.today { color: #C5221F; } .dm-grp.soon { color: #B06000; } .dm-grp.sched { color: #1967D2; }
.dm-proj { border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dm-proj.red { background: #FAD2CF; color: #6B1410; } .dm-proj.org { background: #FCE3BE; color: #5A3600; } .dm-proj.blu { background: #D2E3FC; color: #123A6E; }
.dm-proj .ic { margin-left: auto; display: flex; gap: 8px; font-size: 12px; opacity: .75; }
.dm-tasks { display: grid; gap: 4px; padding-left: 6px; }
.dm-tasks div { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.dm-tasks small { display: block; color: #5F6368; font-size: 10.5px; }
.dm-box { width: 14px; height: 14px; border: 1.5px solid #5F6368; border-radius: 3px; flex: none; margin-top: 2px; }
.dm-box.on { background: #5B3FC4; border-color: #5B3FC4; position: relative; }
.dm-box.on::after { content: ""; position: absolute; left: 3.5px; top: 0.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dm-due { font-size: 12px; } .dm-due b { color: #C5221F; }
.dm-btn { border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; text-align: center; border: 1.5px solid #C9C5D9; color: #3B2AA0; }
.dm-btn.fill { background: #9FD9C9; border-color: #9FD9C9; color: #123; }
.dm-btn.go { background: #1E8E5A; border-color: #1E8E5A; color: #fff; }
.dm-btn.red { background: #F2A6A0; border-color: #F2A6A0; color: #4A0D09; }
.dm-btn.blue { background: #1A73E8; border-color: #1A73E8; color: #fff; }
.dm-row { display: flex; gap: 6px; flex-wrap: wrap; }
.dm-bars { display: grid; gap: 3px; font-size: 11.5px; }
.dm-bars div { display: flex; align-items: center; gap: 6px; }
.dm-bars i { display: inline-block; height: 9px; border-radius: 2px; transition: width .8s ease; }
.dm-track { background: #F3F0FF; border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.dm-track i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1E8E5A; margin-right: 6px; animation: dm-blink 1.2s ease-in-out infinite; }
@keyframes dm-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dm-track i { animation: none; } }
.dm-choice { border-radius: 10px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: #fff; }
.dm-choice small { display: block; font-weight: 400; font-size: 10.5px; opacity: .9; }
.dm-field { display: grid; gap: 2px; font-size: 11px; color: #5F6368; }
.dm-field .v { border-bottom: 1.5px solid #80868B; color: #202124; font-size: 12.5px; padding: 3px 0; }
.dm-radio { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.dm-radio i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #5F6368; flex: none; }
.dm-radio i.on { border: 4px solid #5B3FC4; }
.dm-hint { font-size: 11px; color: #5F6368; }
.dm-notice { position: absolute; left: 10px; right: 10px; bottom: 10px; background: #323232; color: #fff; font-size: 11.5px; border-radius: 6px; padding: 9px 11px; z-index: 4; }

/* ---- other screens: a Doc, a Sheet, the template page ---- */
.dm-doc { height: 100%; background: #F1F3F4; padding: 16px; overflow: hidden; }
.dm-url { font-size: 11px; color: #5F6368; max-width: 560px; margin: 0 auto 8px; }
.dm-page { background: #fff; max-width: 560px; margin: 0 auto; border-radius: 4px; padding: 20px 26px; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .35); font-size: 12px; }
.dm-page h4 { font-family: "Baloo 2", sans-serif; font-size: 22px; margin: 0 0 2px; color: #5B3FC4; }
.dm-page h5 { font-size: 14px; margin: 12px 0 4px; color: #5B3FC4; font-family: inherit; }
.dm-page table { width: 100%; border-collapse: collapse; font-size: 11px; }
.dm-page th { background: #5B3FC4; color: #fff; text-align: left; padding: 4px 6px; font-weight: 600; }
.dm-page td { border: 1px solid #E0DEE8; padding: 4px 6px; height: 20px; color: #3C4043; }
.dm-page td.k { background: #F3F1FA; font-weight: 600; width: 50%; }
.dm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dm-tiles div { background: #F3F1FA; border-radius: 6px; padding: 6px; text-align: center; font-size: 10.5px; color: #3C4043; }
.dm-tiles b { display: block; font-size: 16px; color: #5B3FC4; }
.dm-sheet { height: 100%; background: #fff; display: grid; grid-template-rows: auto 1fr auto; font-size: 11.5px; }
.dm-sheet .bar { padding: 8px 12px; border-bottom: 1px solid #E0E0E0; color: #188038; font-weight: 600; }
.dm-sheet table { border-collapse: collapse; width: 100%; }
.dm-sheet th { background: #F8F9FA; color: #5F6368; font-weight: 600; text-align: left; padding: 5px 8px; border: 1px solid #E0E0E0; }
.dm-sheet td { padding: 5px 8px; border: 1px solid #E0E0E0; white-space: nowrap; }
.dm-sheet .tabs { display: flex; gap: 2px; padding: 6px 10px; background: #F8F9FA; border-top: 1px solid #E0E0E0; overflow: hidden; }
.dm-sheet .tabs span { padding: 4px 10px; border-radius: 4px 4px 0 0; color: #5F6368; white-space: nowrap; }
.dm-sheet .tabs span.on { background: #fff; color: #188038; font-weight: 700; box-shadow: inset 0 -2px #188038; }
.dm-site { height: 100%; background: #FBF9F2; display: grid; grid-template-rows: auto 1fr; }
.dm-site .nav { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid rgba(31, 36, 56, .12); font-family: "Baloo 2", sans-serif; font-weight: 700; color: #322570; }
.dm-site .nav img { width: 20px; height: 20px; }
.dm-site .wrap { padding: 12px 20px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-content: start; overflow: hidden; }
@media (max-width: 640px) { .dm-site .wrap { grid-template-columns: 1fr; } }
.dm-site h4 { font-family: "Baloo 2", sans-serif; font-size: 20px; line-height: 1.1; margin: 2px 0 8px; color: #322570; }
.dm-site .eb { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #3A77BF; }
.dm-steps { list-style: none; margin: 0; padding: 0; }
.dm-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(31, 36, 56, .1); font-size: 12.5px; }
.dm-steps .n { width: 20px; height: 20px; border-radius: 50%; background: #8FD3AE; color: #322570; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.dm-steps .t { font-weight: 600; min-width: 0; }
.dm-steps .d { font-size: 11px; border: 1px solid rgba(31, 36, 56, .15); border-radius: 6px; padding: 2px 6px; color: #4B5169; background: #fff; white-space: nowrap; }
.dm-card { background: #fff; border: 1px solid rgba(31, 36, 56, .12); border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #4B5169; align-self: start; }
.dm-card b { color: #1F2438; }
.dm-pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 6px 12px; border: 1.5px solid #433491; color: #433491; }
.dm-pill.solid { background: #433491; color: #fff; }
.dm-clip { position: absolute; right: 16px; bottom: 60px; width: min(330px, 80%); background: #fff; border: 1px solid #DDD; border-radius: 10px; padding: 10px 12px; font: 11px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; z-index: 5; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .4); }
.dm-toast { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: #1F2438; color: #fff; font-size: 12.5px; border-radius: 10px; padding: 9px 14px; z-index: 5; white-space: nowrap; }
.scene.on .dm-ev.grow { animation: dm-grow 6s linear both; }
@keyframes dm-grow { from { height: 3%; } to { height: 13%; } }
@media (prefers-reduced-motion: reduce) { .scene.on .dm-ev.grow { animation: none; } }
