/* Live Decks from Notion: the About and Documentation pages. Uses the site's colours. */

/* Name and the About / Documentation switch */
.ld-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 28px; }
.ld-name { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.05rem; font-weight: 600; color: var(--heading); }
.ld-badge { font-size: 0.75rem; font-weight: 600; color: var(--brand); background: #e3f1ec; border-radius: 999px; padding: 3px 10px; }
.ld-tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.ld-tabs a { padding: 8px 22px; border-radius: 999px; color: var(--heading); text-decoration: none; font-weight: 500; }
.ld-tabs a:hover { background: var(--page); color: var(--brand); }
.ld-tabs a[aria-current="page"] { background: var(--brand); color: var(--accent-text); }

/* About page */
.ld-hero { text-align: center; max-width: 760px; margin: 12px auto 44px; }
.ld-hero h1 { font-size: 2.5rem; margin: 0 0 12px; }
.ld-hero .lead { font-size: 1.15rem; margin: 0 auto 22px; max-width: 640px; }
.ld-hero .hero-actions { justify-content: center; }
.ld-facts { color: var(--muted); font-size: 0.9rem; margin: 16px 0 0; }
.ld-section { max-width: 820px; margin: 0 auto; padding: 36px 0; border-top: 1px solid var(--border); }
.ld-section > h2 { margin: 0 0 14px; font-size: 1.5rem; color: var(--brand); }
.ld-section p, .ld-section li { line-height: 1.65; }
.ld-steps { margin: 6px 0 22px; }
.ld-steps li { align-items: flex-start; }
.ld-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.ld-list li { padding-left: 22px; position: relative; }
.ld-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 600; }
.ld-list a { color: var(--link); }
.ld-more { margin-top: 18px; }
.ld-more a { color: var(--brand); font-weight: 600; }

/* Example: a Notion toggle and the Anki card it becomes */
.ld-demo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: center; margin: 8px 0 0; }
.ld-demo figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.ld-demo figcaption { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.ld-demo p { margin: 0; line-height: 1.45; }
.ld-arrow { font-size: 2rem; color: var(--brand); }
.ld-page { font-size: 1.2rem; font-weight: 600; color: #37352f; margin-bottom: 8px !important; }
.ld-toggle { padding: 4px 0 4px 22px; position: relative; color: #37352f; }
.ld-toggle::before { content: "▸"; position: absolute; left: 4px; top: 4px; color: #91918e; }
.ld-toggle.open::before { content: "▾"; }
.ld-toggle .ld-a { color: #55534e; padding: 4px 0 6px; }
.ld-card { text-align: center; }
.ld-topic { display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--brand); background: #e3f1ec; border-radius: 999px; padding: 2px 10px; margin-bottom: 10px !important; }
.ld-front { font-size: 1.1rem; font-weight: 600; color: var(--heading); }
.ld-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--border); margin-top: 14px !important; padding-top: 12px; }
.ld-back { margin-top: 6px !important; }
.ld-edit { font-size: 0.8rem; color: var(--link); margin-top: 12px !important; }

/* Documentation page: menu on the left, text on the right */
.ld-docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.ld-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: 0.92rem; padding-right: 6px; }
.ld-side > summary { display: none; }
.ld-side ol { list-style: none; margin: 0; padding: 0; }
.ld-side > nav > ol > li { margin: 2px 0 8px; }
.ld-side ol ol { margin: 2px 0 0 14px; padding-left: 10px; border-left: 1px solid var(--border); }
.ld-side a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none; line-height: 1.35; }
.ld-side > nav > ol > li > a { font-weight: 600; color: var(--heading); }
.ld-side a:hover { background: var(--surface); color: var(--brand); }
.ld-side a.ld-here { background: #e3f1ec; color: var(--brand); }
.ld-doc { max-width: 780px; }
.ld-doc h1 { font-size: 2rem; margin: 0 0 8px; }
.ld-doc h2 { font-size: 1.45rem; color: var(--brand); margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--border); scroll-margin-top: 12px; }
.ld-doc h3 { font-size: 1.12rem; color: var(--heading); margin: 28px 0 8px; scroll-margin-top: 12px; }
.ld-doc p, .ld-doc li { line-height: 1.7; }
.ld-doc li { margin: 4px 0; }
.ld-doc code, .ld-doc kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.ld-ex { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85rem; line-height: 1.6; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 16px; margin: 12px 0 16px; overflow-x: auto; white-space: pre; }
.ld-note { background: #fdf3e2; border: 1px solid #f0d49b; border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
.ld-note p { margin: 0; }
.ld-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); margin: 12px 0 16px; font-size: 0.95rem; }
.ld-table th, .ld-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); line-height: 1.5; }
.ld-table thead th { background: #eef5f3; color: var(--heading); }
.ld-shot { margin: 12px 0 18px; }
.ld-shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
.ld-shot figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.ld-top-link { font-size: 0.85rem; }

@media (max-width: 860px) {
  .ld-docs { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ld-side { position: static; max-height: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0; }
  .ld-side > summary { display: block; cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--brand); }
  .ld-side > nav { padding: 0 12px 12px; }
}
@media (max-width: 760px) {
  .ld-hero h1 { font-size: 2rem; }
  .ld-demo { grid-template-columns: 1fr; }
  .ld-arrow { transform: rotate(90deg); justify-self: center; }
  .ld-list { grid-template-columns: 1fr; }
  .ld-tabs { width: 100%; }
  .ld-tabs a { flex: 1; text-align: center; padding: 8px 10px; }
}

/* Screenshots */
.ld-shot a { display: block; }
.ld-shot img { box-shadow: 0 2px 10px rgba(30, 42, 50, 0.08); }
.ld-doc .ld-shot { margin: 14px 0 20px; }
.ld-doc li > .ld-shot { margin: 10px 0 16px; }
.ld-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 4px 0 24px; align-items: start; }
.ld-pics .ld-shot { margin: 0; }
.ld-pics figcaption { font-weight: 600; color: var(--heading); font-size: 0.9rem; }
.ld-sub { margin: 0 0 10px; font-weight: 600; color: var(--heading); }
@media (max-width: 760px) { .ld-pics { grid-template-columns: 1fr; } }
.ld-pics img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; background: #fff; }
.ld-shot.ld-small img { max-width: min(400px, 100%); }
/* About: a real toggle and the card it makes */
.ld-real { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.ld-real .ld-shot { margin: 0; }
.ld-real figcaption { font-weight: 600; color: var(--heading); font-size: 0.9rem; }
@media (max-width: 760px) { .ld-real { grid-template-columns: 1fr; } .ld-real .ld-arrow { transform: rotate(90deg); justify-self: center; } }

/* The contents menu sits on its own white panel, apart from the cream page behind the text */
@media (min-width: 861px) {
  .ld-side { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 10px; box-shadow: 0 2px 10px rgba(30, 42, 50, 0.05); }
  .ld-side a:hover { background: var(--card); }
}

/* Documentation screenshots: a little smaller than the text column (click one to see it full size) */
.ld-doc .ld-shot img { max-width: min(640px, 100%); }
.ld-doc .ld-shot.ld-small img { max-width: min(340px, 100%); }
/* Show screenshots whole: never cut off */
.ld-pics img { aspect-ratio: auto; object-fit: contain; }
/* How it works: the three screenshots as a flow, one above the other */
.ld-pics.ld-flow { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 640px; margin: 8px auto 28px; }
.ld-flow .ld-shot { width: 100%; }
.ld-flow figcaption { text-align: center; font-size: 1rem; margin-top: 8px; }
.ld-down { font-size: 2rem; line-height: 1; color: var(--brand); margin: 4px 0; }

/* About: the main benefits, up front */
.ld-benefits-wrap { max-width: 1000px; margin: 0 auto 12px; }
.ld-benefits-wrap > h2 { text-align: center; font-size: 1.6rem; color: var(--brand); margin: 0 0 18px; }
.ld-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ld-benefit { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; }
.ld-benefit h3 { margin: 10px 0 6px; font-size: 1.2rem; color: var(--heading); }
.ld-benefit p { margin: 0 0 10px; line-height: 1.55; flex: 1; }
.ld-benefit a { color: var(--brand); font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.ld-benefit a:hover { text-decoration: underline; }
.ld-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #e3f1ec; color: var(--brand); font-weight: 700; font-size: 1.1rem; }
@media (max-width: 900px) { .ld-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ld-benefits { grid-template-columns: 1fr; } }
.ld-icon { font-size: 1.35rem; }

/* Benefit boxes: more compact */
.ld-benefits-wrap { max-width: 900px; }
.ld-benefits-wrap > h2 { font-size: 1.45rem; margin-bottom: 14px; }
.ld-benefits { gap: 12px; }
.ld-benefit { padding: 14px 16px; border-top-width: 3px; }
.ld-benefit h3 { font-size: 1.05rem; margin: 8px 0 4px; }
.ld-benefit p { font-size: 0.92rem; line-height: 1.5; margin-bottom: 8px; }
.ld-benefit a { font-size: 0.85rem; }
.ld-icon { width: 34px; height: 34px; font-size: 1.1rem; }
.ld-benefit h3 { margin-top: 0; }
/* Benefit boxes line up with the sections below */
.ld-benefits-wrap { max-width: 820px; }
/* How it works flow: small enough to see the whole flow at once (click a picture for full size) */
.ld-pics.ld-flow { max-width: 380px; gap: 2px; }
.ld-flow figcaption { font-size: 0.95rem; margin-top: 4px; }
.ld-down { font-size: 1.6rem; margin: 2px 0; }
.ld-pics.ld-flow { max-width: 300px; }

/* How it works: compact "story" — steps on the left, the matching screenshot on the right */
.ld-story { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 24px; align-items: center; margin: 8px 0 28px; }
.ld-story-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ld-story-steps li { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: var(--muted);
  background: none; border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; cursor: pointer; line-height: 1.5; transition: background .2s, color .2s, border-color .2s; }
.ld-story-steps strong { color: inherit; }
.ld-story-steps .ld-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--border); color: var(--heading); font-weight: 600; font-size: .9rem; transition: background .2s, color .2s; }
.ld-story-steps li.on { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: 0 2px 10px rgba(30, 42, 50, .06); }
.ld-story-steps li.on strong { color: var(--heading); }
.ld-story-steps li.on .ld-n { background: var(--brand); color: #fff; }
.ld-story-pic { position: relative; height: 340px; }
.ld-story-pic a { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .35s; pointer-events: none; }
.ld-story-pic a.on { opacity: 1; pointer-events: auto; }
.ld-story-pic img { max-width: 100%; max-height: 100%; width: auto; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 2px 10px rgba(30, 42, 50, .08); background: #fff; }
@media (max-width: 760px) {
  .ld-story { grid-template-columns: 1fr; }
  .ld-story-pic { height: 240px; }
}
.ld-story-steps li p { margin: 0; }
.ld-story-steps li:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* How it works: click-through steps — numbered buttons, one big screenshot at a time */
.ld-click { margin: 8px 0 28px; }
.ld-click-tabs { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ld-click-tabs li { display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border: 2px solid var(--brand); border-radius: 999px; background: var(--surface);
  color: var(--brand); font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.ld-click-tabs li:hover { background: #eef5f3; }
.ld-click-tabs li.on { background: var(--brand); color: #fff; }
.ld-click-tabs .ld-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e3f1ec; color: var(--brand); font-size: .85rem; }
.ld-click-tabs li.on .ld-n { background: #fff; }
.ld-click-tabs li:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ld-click-panel { display: none; }
.ld-click-panel.on { display: block; }
.ld-click-panel p { text-align: center; margin: 0 auto 12px; max-width: 620px; }
.ld-click-panel a { display: grid; place-items: center; height: 380px; }
.ld-click-panel img { max-width: 100%; max-height: 100%; width: auto; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 2px 10px rgba(30, 42, 50, .08); background: #fff; }
.ld-click-next { text-align: center; margin: 10px 0 0; }
.ld-click-next a { color: var(--brand); font-weight: 600; text-decoration: none; }
.ld-click-next a:hover { text-decoration: underline; }
@media (max-width: 760px) { .ld-click-panel a { height: 240px; } .ld-click-tabs li { font-size: .9rem; } }
.ld-click-panel a { height: 420px; }
@media (max-width: 760px) { .ld-click-panel a { height: auto; } }
/* Keep each step's screenshot inside its box at any screen width */
.ld-click-panel a { height: auto; display: flex; justify-content: center; }
.ld-click-panel img { max-height: 420px; max-width: 100%; width: auto; height: auto; }
@media (max-width: 760px) { .ld-click-panel img { max-height: 260px; } }
