/* Timeline explorer (#timeline, timeline.js), shared by every lab; also the small "Timeline" link in each lab's
   header. Same green palette as the Ripples page; the lab marks (◉ Earth, ◆ Art, ◈ Economy) tell the labs apart by
   shape, and lit and dimmed items differ by weight and outline as well as colour. */

/* Header link, beside "How it works" (labs.js) */
.timeline-link{margin-left:16px;padding:6px 12px;border:1px solid #cfd8c6;border-radius:999px;background:#fffdf8;color:#315c49;font-size:12.5px;font-weight:600;line-height:1;text-decoration:none;white-space:nowrap}
.timeline-link:hover,.timeline-link[aria-current="page"]{border-color:#315c49}
.timeline-link+.tour-replay{margin-left:8px}
@media (max-width:650px){.timeline-link{margin-left:auto;padding:6px 10px}.timeline-link+.tour-replay{margin-left:6px}}

.tl-head{max-width:860px;margin:0 0 16px}.tl-head h1{margin:12px 0 12px}
.tl-lead{font-size:16px;line-height:1.7;color:#4d5e54;max-width:700px;margin:0}
.tl-loading{color:#5d6e5f;font-size:15px}
.tl-section-title{font:700 12px/1.3 ui-sans-serif,system-ui,sans-serif;letter-spacing:2px;color:#315c49;margin:0 0 2px}
.tl-section-note{font-size:13.5px;color:#5d6e5f;margin:0 0 8px}

/* Controls */
.tl-controls{display:grid;gap:8px;margin:0 0 16px;max-width:1200px}
.tl-group{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tl-group-name,.tl-search label{font-size:10.5px;letter-spacing:1.4px;font-weight:700;color:#75856b;text-transform:uppercase;min-width:52px}
.tl-chip{min-height:32px;padding:4px 11px;border-radius:18px;border:1px solid #c8d3bd;background:#fff;color:#2f513f;font-family:inherit;font-weight:600;font-size:12.5px;line-height:1.2;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.tl-chip[aria-pressed="true"]{background:#315c49;border-color:#315c49;color:#fffdf5}
.tl-chip[aria-pressed="true"] .rp-mark{background:#fffdf5}
.tl-chip[aria-pressed="false"]{color:#6d7a69;border-style:dashed}
.tl-chip:focus-visible,.tl-item:focus-visible,.tl-line-btn:focus-visible,.tl-row-btn:focus-visible,.tl-jump:focus-visible,.tl-band-label:focus-visible,.tl-scroll:focus-visible{outline:3px solid #b5641a;outline-offset:2px}
.tl-filters{display:grid;gap:8px}.tl-filters>summary{cursor:pointer;font-size:13px;font-weight:600;color:#315c49;min-height:36px;display:flex;align-items:center}
.tl-filters[open]>summary{display:none}
@media (max-width:760px){.tl-filters[open]>summary{display:flex}}
.tl-search{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tl-search input{flex:0 1 300px;min-width:0;min-height:38px;padding:6px 12px;border:1px solid #c8d3bd;border-radius:10px;font-family:inherit;font-size:15px;background:#fffdf8;color:#263f36}
.tl-count{font-size:13px;color:#5d6e5f}

/* Line-ups */
.tl-lines{margin:0 0 14px;max-width:1200px}
.tl-lines ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.tl-line-btn{display:grid;gap:2px;text-align:left;min-height:44px;padding:7px 12px;border:1px solid #d9cfb5;border-left:4px solid #b5641a;border-radius:10px;background:#fffaf0;color:#3d3423;font-family:inherit;cursor:pointer}
.tl-line-btn b{font-size:13.5px}.tl-line-btn span{font-size:12px;color:#7a6a4d}
.tl-line-btn[aria-pressed="true"]{background:#f6e7c8;border-color:#b5641a}

/* Wide: the frame */
.tl-scale-note{font-size:12.5px;color:#5d6e5f;margin:0 0 6px;display:flex;align-items:center;gap:8px}
.tl-break-key{display:inline-block;width:0;height:14px;border-left:2px dashed #9a8a63}
.tl-frame{position:relative;display:grid;grid-template-columns:150px minmax(0,1fr);border:1px solid #dce4d5;border-radius:14px;background:#fffdf8;overflow:hidden}
.tl-names{position:relative;border-right:1px solid #e3e7dc;background:#f7f8f1}
.tl-lane-name{position:absolute;left:0;right:0;display:flex;align-items:flex-start;gap:6px;padding:12px 10px 0;box-sizing:border-box;font-size:12.5px;font-weight:700;color:#315c49;line-height:1.3;border-top:1px solid #e9ece3}
.tl-scroll{overflow-x:auto;overflow-y:hidden;cursor:grab;scrollbar-width:thin}
.tl-scroll.is-dragging{cursor:grabbing;user-select:none}
.tl-canvas{position:relative;overflow:hidden}
.tl-lane{position:absolute;left:0;right:0;border-top:1px solid #e9ece3}
.tl-lane:nth-of-type(even){background:rgba(238,243,231,.45)}
.tl-empty{position:absolute;left:16px;top:12px;font-size:12.5px;color:#8a9585;font-style:italic}
.tl-tick{position:absolute;top:8px;transform:translateX(-50%);font-size:11.5px;color:#5d6e5f;white-space:nowrap;font-variant-numeric:tabular-nums}
.tl-grid{position:absolute;top:28px;width:0;border-left:1px solid #e4e8de;pointer-events:none}
.tl-break{position:absolute;top:28px;width:0;border-left:2px dashed #b8a97f;pointer-events:none}
.tl-band{position:absolute;top:30px;background:rgba(246,231,200,.45);border-left:1px solid #e3c98f;border-right:1px solid #e3c98f;pointer-events:none}
.tl-band.is-on{background:rgba(246,231,200,.85);border-color:#b5641a}
.tl-band-label{position:absolute;top:2px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 8px;border:1px solid #e3c98f;border-radius:9px;background:#fffaf0;color:#7a4a14;font-family:inherit;font-weight:600;font-size:11px;line-height:1.2;cursor:pointer;z-index:3;display:none}
.tl-frame.has-sel .tl-band-label.is-on{display:block}
.tl-now{position:absolute;top:28px;background:rgba(181,100,26,.12);border-left:2px solid #b5641a;border-right:2px solid #b5641a;pointer-events:none;z-index:1}
.tl-now-window{position:absolute;top:28px;background:rgba(181,100,26,.05);pointer-events:none;z-index:1}

/* Items: a dot (moment) or a bar (span), with its label */
.tl-item{position:absolute;z-index:2;display:flex;align-items:center;gap:5px;height:22px;padding:0 4px 0 0;border:0;background:none;color:#263f36;font-family:inherit;font-size:12.5px;line-height:1.1;cursor:pointer;white-space:nowrap;text-align:left}
.tl-item.is-span{min-width:var(--w);padding:0}
.tl-dot{flex:none;width:11px;height:11px;border-radius:50%;background:#315c49;border:2px solid #fffdf8;box-shadow:0 0 0 1px #315c49}
.tl-lab-art .tl-dot{border-radius:0;transform:rotate(45deg) scale(.9)}
.tl-lab-economy .tl-dot{border-radius:2px}
.tl-bar{position:absolute;left:0;top:3px;width:var(--w);height:16px;border-radius:8px;background:#dfe9d6;border:1px solid #8fae86;box-sizing:border-box}
.tl-item.is-span .tl-label{position:relative;padding:0 8px;font-weight:600;color:#29483a}
.tl-label{overflow:visible}
.tl-item.is-dot{height:14px;width:12px;padding:0}
.tl-item.is-dot .tl-label{display:none}
.tl-item.is-dot.is-sel{z-index:5}.tl-item.is-dot.is-sel .tl-label{display:block;position:absolute;left:14px;top:-5px}
.tl-item.is-dot .tl-dot{width:8px;height:8px}
.tl-item.is-dot.is-span .tl-bar{top:4px;height:6px;width:100%;border-radius:3px}
.tl-item.is-minor .tl-dot{background:#8fae86;box-shadow:0 0 0 1px #8fae86}
.tl-item:hover .tl-label{text-decoration:underline}
.tl-item.is-dim{opacity:.28}
.tl-item.is-lit .tl-label{font-weight:700}
.tl-item.is-lit .tl-bar{background:#f6e7c8;border-color:#b5641a}
.tl-item.is-lit .tl-dot{background:#b5641a;box-shadow:0 0 0 1px #b5641a}
.tl-item.is-sel{z-index:4}
.tl-item.is-sel .tl-label{background:#b5641a;color:#fffdf5;border-radius:6px;padding:2px 6px}
.tl-item.is-sel .tl-dot{width:13px;height:13px;background:#b5641a;box-shadow:0 0 0 2px #7a4a14}
.tl-item.is-nomatch{opacity:.2}
/* Not taught here yet: hollow and dashed, as on the syllabus map (a gap), so it reads as a gap without colour. */
.tl-item.is-gap .tl-bar{background:#fffdf8;border:1.5px dashed #8b9a86}
.tl-item.is-gap .tl-dot{background:#fffdf8;box-shadow:0 0 0 1.5px #8b9a86}
.tl-item.is-gap .tl-label{font-weight:500;font-style:italic;color:#56665a}
.tl-item.is-gap.is-lit .tl-bar{background:#fffaf0;border-color:#b5641a}.tl-item.is-gap.is-lit .tl-dot{background:#fffaf0;box-shadow:0 0 0 1.5px #b5641a}
.tl-item.is-gap.is-sel .tl-label{font-style:normal;color:#fffdf5}
.tl-gap-key{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#5d6e5f;margin:6px 0}
.tl-gap-swatch{flex:none;width:30px;height:12px;border-radius:6px;border:1.5px dashed #8b9a86;background:#fffdf8}
.tl-badge.is-gap{border:1.5px dashed #8b9a86;color:#56665a;background:#fffdf8}
.tl-jump.is-gap{border-style:dashed}
.tl-row.is-gap .tl-row-what b{font-style:italic;font-weight:500}
.tl-gap-tag{font-style:italic}
.tl-hint{font-size:12.5px;color:#6d7a69;margin:8px 0 0}

/* The card */
.tl-card-slot{margin:16px 0 0;max-width:860px}
.tl-card{padding:16px 20px;border:1px solid #dce4d5;border-left:4px solid #b5641a;border-radius:12px;background:#fffdf8}
.tl-card.is-empty{border-left-color:#c8d3bd;color:#5d6e5f;font-size:14px}.tl-card.is-empty p{margin:0}
.tl-card-meta{font-size:10.5px;letter-spacing:1.4px;font-weight:700;color:#75856b;margin:0}
.tl-card h2{font:24px/1.25 Georgia,serif;margin:6px 0 4px;color:#263f36}
.tl-card h2:focus{outline:none}
.tl-when{margin:0 0 8px;font-size:15px;color:#3d4f44;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tl-badge{font-size:10.5px;letter-spacing:1px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:9px;border:1px dashed #8fae86;color:#4d6b55}
.tl-badge.is-debated{border:1px solid #b5641a;color:#7a4a14;background:#fffaf0}
.tl-line{font-size:15.5px;line-height:1.6;margin:0 0 8px;color:#33463c}
.tl-note{font-size:13.5px;line-height:1.55;color:#5d6e5f;margin:4px 0}
.tl-partof{font-size:13.5px;color:#5d6e5f;margin:8px 0}
.tl-meanwhile{margin:10px 0 4px;padding:10px 12px;border-radius:10px;background:#f4f7ee}
.tl-meanwhile h3{font:700 11px/1.3 ui-sans-serif,system-ui,sans-serif;letter-spacing:1.6px;text-transform:uppercase;color:#315c49;margin:0 0 6px}
.tl-meanwhile ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.tl-meanwhile li{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px}
.tl-meanwhile li>span{min-width:170px;color:#5d6e5f;font-weight:600}
.tl-jump{min-height:34px;padding:4px 10px;border:1px solid #c8d3bd;border-radius:16px;background:#fff;color:#2f513f;font-family:inherit;font-weight:600;font-size:13px;line-height:1.25;cursor:pointer;text-align:left}
.tl-jump small{font-weight:400;color:#6d7a69}
.tl-jump:hover{border-color:#315c49}
.tl-members li{display:block}
.tl-source{font-size:12.5px;color:#6d7a69;line-height:1.5;margin:8px 0 10px}.tl-source span{font-weight:700;letter-spacing:1px;text-transform:uppercase;font-size:10.5px;margin-right:4px}
.tl-source a{color:#315c49}
.tl-card .rp-learn a+a{margin-left:4px}
.tl-foot{font-size:12px;color:#778273;margin-top:18px;max-width:860px}

/* Narrow: the vertical list */
.tl-list{list-style:none;margin:0;padding:0 0 0 14px;border-left:2px solid #c8d3bd;display:grid;gap:4px}
.tl-group-head{position:sticky;top:0;z-index:1;margin:12px 0 2px -16px;padding:4px 0 4px 16px;background:var(--paper,#fdfcf7);font:700 11px/1.3 ui-sans-serif,system-ui,sans-serif;letter-spacing:1.4px;text-transform:uppercase;color:#315c49}
.tl-row{position:relative}
.tl-row::before{content:'';position:absolute;left:-21px;top:16px;width:10px;height:10px;border-radius:50%;background:#315c49;border:2px solid #fffdf8}
.tl-row.is-dim{opacity:.45}
.tl-row.is-lit::before,.tl-row.is-sel::before{background:#b5641a}
.tl-row-btn{display:grid;grid-template-columns:minmax(0,96px) minmax(0,1fr);gap:10px;width:100%;min-height:44px;padding:6px 8px;border:1px solid transparent;border-radius:10px;background:none;color:#263f36;font-family:inherit;text-align:left;cursor:pointer}
.tl-row-btn:hover{background:#f4f7ee}
.tl-row.is-sel>.tl-row-btn{border-color:#b5641a;background:#fffaf0}
.tl-row.is-lit:not(.is-sel)>.tl-row-btn b{color:#7a4a14}
.tl-row-when{font-size:12.5px;color:#5d6e5f;line-height:1.35;overflow-wrap:anywhere}
.tl-row-what{display:grid;gap:1px;font-size:14px;line-height:1.35;min-width:0}
.tl-row-what b{font-weight:600;overflow-wrap:anywhere}.tl-row-what small{font-size:11.5px;color:#75856b}
.tl-row-card{margin:6px 0 10px}
.tl-row-card .tl-card{padding:12px 14px}
.tl-row-card .tl-meanwhile li>span{min-width:0;width:100%}
@media (max-width:760px){
  .tl-group{gap:5px}.tl-group-name{width:100%}
  .tl-chip{min-height:34px;padding:5px 10px;font-size:12.5px}
  .tl-lines ul{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity}.tl-lines li{flex:0 0 auto;scroll-snap-align:start}
  .tl-card-slot:has(.tl-card.is-empty){display:none}
  .tl-card-slot{display:none}
}
@media (prefers-reduced-motion:reduce){.tl-scroll{scroll-behavior:auto}}

/* Rulers' regional rows: a quiet name in the lane-name column and a faint dashed rule across the canvas between rows. */
.tl-group-name-tag{position:absolute;left:0;right:0;padding:1px 8px 0 26px;box-sizing:border-box;font-size:11px;font-weight:600;color:#56665a;line-height:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.tl-group-name-tag.is-empty{color:#8b9a86;font-weight:500}
.tl-group-line{position:absolute;left:0;right:0;height:0;border-top:1px dashed #dde3d4;pointer-events:none;z-index:1}
/* Phone list: a gap row has a hollow dot and a dashed outline. */
.tl-row.is-gap::before{background:#fffdf8;border:2px dashed #8b9a86}
.tl-row.is-gap:not(.is-sel)>.tl-row-btn{border:1px dashed #c8d3bd}

/* Succession: the dynasty before and after the selected one keep full strength and gain an amber dashed ring. */
.tl-item.is-chain{opacity:1}
.tl-item.is-chain .tl-bar{border:2px dashed #b5641a;background:#fffaf0}
.tl-item.is-chain .tl-dot{box-shadow:0 0 0 2px #b5641a}
.tl-item.is-chain .tl-label{font-weight:700;color:#7a4a14}
.tl-chain{margin:6px 0 8px;display:grid;gap:6px}
.tl-chain p{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tl-chain p>span,.tl-seat b{font-size:10.5px;letter-spacing:1.2px;font-weight:700;text-transform:uppercase;color:#75856b;min-width:52px}
.tl-chain-jump{border-color:#e3c98f}
.tl-seat{display:flex;flex-wrap:wrap;gap:4px 18px;margin:2px 0 8px;font-size:14px;color:#33463c}
.tl-seat b{margin-right:6px}
/* A soft fade at the right edge of the scrolling timeline says it carries on, instead of a hard cut through a label. */
.tl-frame::after{content:'';position:absolute;top:0;right:0;bottom:0;width:28px;background:linear-gradient(to right,rgba(255,253,248,0),#fffdf8 85%);pointer-events:none;z-index:6}
/* Gap labels: still italic, but darker and heavier so they read as easily as solid bars. */
.tl-item.is-gap .tl-label{font-weight:600;color:#3f4f44}

.tl-more{margin:10px 0 8px;border-top:1px solid #e3e8dc;padding-top:8px}
.tl-more summary{cursor:pointer;font-size:12.5px;font-weight:700;color:#315c49;list-style:none;display:inline-flex;align-items:center;gap:6px;min-height:32px}
.tl-more summary::-webkit-details-marker{display:none}
.tl-more summary::before{content:'▸';font-size:11px;transition:transform .15s}
.tl-more[open] summary::before{transform:rotate(90deg)}
@media (prefers-reduced-motion:reduce){.tl-more summary::before{transition:none}}
.tl-more[open]>:not(summary){margin-top:6px}

/* Kings layer (timeline-kings.js): the region switch, a dynasty's "at a glance" block, king segments and cards. */
.tl-chip-kings[aria-pressed="false"]{border-style:solid;border-color:#e3c98f;color:#7a4a14}
.tl-chip-kings[aria-pressed="true"]{background:#7a4a14;border-color:#7a4a14;color:#fffdf5}
.tl-kings-group .tl-group-name{color:#7a4a14}
.tl-kings-note{font-size:12.5px;color:#5d6e5f;margin-left:4px}.tl-kings-note b{color:#4a3418}
.tl-glance{margin:8px 0 10px;padding:10px 12px;border:1px solid #e3d9bf;border-radius:10px;background:#fffaf0;display:grid;gap:6px}
.tl-glance h3,.tl-what h3{font:700 11px/1.3 ui-sans-serif,system-ui,sans-serif;letter-spacing:1.6px;text-transform:uppercase;color:#7a4a14;margin:0}
.tl-glance p{margin:0;display:grid;grid-template-columns:86px minmax(0,1fr);gap:8px;font-size:14px;line-height:1.5;color:#33463c}
.tl-glance p>b{font-size:10.5px;letter-spacing:1.2px;font-weight:700;text-transform:uppercase;color:#75856b;padding-top:3px}
.tl-glance-chips{display:flex;flex-wrap:wrap;gap:6px}
.tl-king-chip{border-color:#e3c98f}
.tl-king-chip.is-undrawn{border-style:dotted}
.tl-kings-btn{justify-self:start;min-height:36px;padding:6px 14px;border:1px solid #b5641a;border-radius:18px;background:#fff;color:#7a4a14;font-family:inherit;font-weight:700;font-size:13px;cursor:pointer}
.tl-kings-btn[aria-pressed="true"]{background:#b5641a;color:#fffdf5}
.tl-kings-btn:focus-visible,.tl-link:focus-visible{outline:3px solid #b5641a;outline-offset:2px}
.tl-what{margin:8px 0}
.tl-what ul{margin:6px 0 0;padding-left:20px;display:grid;gap:5px}
.tl-what li{font-size:14.5px;line-height:1.55;color:#33463c}
.tl-link{border:0;background:none;padding:0;color:#315c49;font:inherit;font-weight:600;text-decoration:underline;cursor:pointer}
.tl-card-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:8px 0 0}
.tl-card.is-king{border-left-color:#7a4a14}
/* A king's segment: a slimmer, warmer bar with a square start, so a run of reigns reads as one dynasty taken apart. */
.tl-item.is-king .tl-bar{top:5px;height:12px;border-radius:2px 6px 6px 2px;background:#f3e3c3;border:1px solid #b08850;border-left:3px solid #7a4a14}
.tl-item.is-king .tl-label{font-weight:600;color:#4a3418}
.tl-item.is-king.is-co .tl-bar{background:repeating-linear-gradient(135deg,#f3e3c3 0 4px,#fffaf0 4px 8px);border-left-style:dashed}
.tl-king-dyn{font-size:10px;letter-spacing:.8px;text-transform:uppercase;font-weight:700;color:#7a6a4d}
.tl-item.is-king.is-sel .tl-king-dyn{color:#fffdf5}
.tl-item.is-king.is-lit .tl-bar{background:#f6d9a6;border-color:#b5641a}
/* Kings of a dynasty not taught here yet keep the gap look: hollow, dashed, italic. */
.tl-item.is-king.is-gap .tl-bar{background:#fffdf8;border:1.5px dashed #8b9a86;border-left:3px dashed #8b9a86}
.tl-item.is-king.is-gap .tl-label{font-weight:500;font-style:italic;color:#56665a}
.tl-item.is-king.is-gap.is-lit .tl-bar{background:#fffaf0;border-color:#b5641a}
.tl-item.is-king.is-gap.is-sel .tl-label{font-style:normal;color:#fffdf5}
.tl-king-swatch{flex:none;width:30px;height:12px;border-radius:2px 6px 6px 2px;background:#f3e3c3;border:1px solid #b08850;border-left:3px solid #7a4a14}
/* Phone: a dynasty's kings indented under it. */
.tl-kings{list-style:none;margin:2px 0 6px 18px;padding:0 0 0 10px;border-left:2px dashed #e3c98f;display:grid;gap:2px}
.tl-king-row::before{left:-17px;width:7px;height:7px;top:17px;border-radius:1px;background:#b08850}
.tl-king-row .tl-row-btn{min-height:40px}
@media (max-width:760px){.tl-glance p{grid-template-columns:minmax(0,1fr);gap:2px}}
.tl-item.is-king.is-out .tl-label{margin-left:calc(var(--w) + 2px);padding:0 4px}
.tl-item.is-king.is-out.is-sel .tl-label{padding:2px 6px}

/* Region view (a region's Kings chip): one row per dynasty. Each reign is a segment exactly its length, end to end with
   the next; the dark square start marks where a reign begins. The name sits inside when it fits; otherwise the segment
   is plain and the name shows above it on hover, keyboard focus or selection. */
.tl-item.is-compact{height:20px;width:max(var(--w),3px);min-width:0;padding:0;gap:0;overflow:visible}
.tl-item.is-compact .tl-bar{top:2px;height:16px;width:100%;border-radius:1px;border-left-width:2px}
.tl-item.is-compact .tl-label{position:absolute;left:3px;right:2px;top:3px;padding:0;font-size:11px;line-height:14px;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}
.tl-item.is-compact.is-sel .tl-label{background:none;color:#fffdf5;padding:0}
.tl-item.is-compact.is-sel .tl-bar{background:#b5641a;border-color:#7a4a14}
.tl-item.is-compact:hover .tl-label{text-decoration:none}
.tl-item.is-compact.is-thin{height:9px}
.tl-item.is-compact.is-thin .tl-bar{top:1px;height:7px;border-radius:1px}
.tl-tip{display:none;position:absolute;left:0;bottom:calc(100% + 3px);z-index:7;padding:3px 7px;border-radius:6px;background:#4a3418;color:#fffdf5;font-size:12px;font-weight:600;line-height:1.25;white-space:nowrap;pointer-events:none;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.tl-tip small{font-weight:400;opacity:.85}
.tl-item.is-compact.is-thin .tl-tip{bottom:auto;top:calc(100% + 3px)}
.tl-item.is-compact:is(:hover,:focus-visible,.is-sel) .tl-tip{display:block}
.tl-item.is-compact:not(.is-bare):not(.is-cut):not(:focus-visible):not(:hover) .tl-tip{display:none}
.tl-item.is-compact:is(:hover,:focus-visible,.is-sel){z-index:6}
.tl-item.is-compact.is-dim{opacity:.35}
/* Kings of a dynasty not taught here yet keep the gap look in the region view too. */
.tl-item.is-compact.is-gap .tl-bar{background:#fffdf8;border:1.5px dashed #8b9a86;border-left:2px dashed #6f7d6a}
.tl-item.is-compact.is-gap.is-sel .tl-bar{background:#b5641a;border-style:solid}
.tl-dyn-head{position:absolute;z-index:3;height:16px;padding:0 6px;border:0;border-radius:4px;background:rgba(255,253,248,.92);color:#7a6a4d;font:700 10px/16px ui-sans-serif,system-ui,sans-serif;letter-spacing:.8px;text-transform:uppercase;white-space:nowrap;cursor:pointer}
.tl-dyn-head:hover{color:#4a3418;text-decoration:underline}
.tl-dyn-head.is-gap{font-style:italic;font-weight:600;color:#6f7d6a}
.tl-dyn-head.is-dim{opacity:.4}.tl-dyn-head.is-lit,.tl-dyn-head.is-sel{color:#7a4a14}
.tl-dyn-head:focus-visible{outline:3px solid #b5641a;outline-offset:1px}
/* Zoom while a region's kings are open: − 3× + beside the region chips. */
.tl-zoom{display:inline-flex;align-items:center;gap:2px;margin-left:6px;padding:2px;border:1px solid #e3c98f;border-radius:18px;background:#fff}
.tl-zoom-btn{width:30px;height:28px;border:0;border-radius:14px;background:none;color:#7a4a14;font:700 17px/1 inherit;font-family:inherit;cursor:pointer}
.tl-zoom-btn:hover:not(:disabled){background:#fffaf0}
.tl-zoom-btn:disabled{color:#c8bfa8;cursor:default}
.tl-zoom-btn:focus-visible{outline:3px solid #b5641a;outline-offset:1px}
.tl-zoom-level{min-width:30px;text-align:center;font-size:12.5px;font-weight:700;color:#4a3418;font-variant-numeric:tabular-nums}

/* Learn ⇄ Recall (timeline.js `state.mode`): a two-part switch; in Recall each name is a muted "?" in the same place,
   the bar, dot and colour unchanged. A revealed name keeps a dotted amber underline, so revealed and hidden read apart. */
.tl-mode-group{gap:8px}
.tl-mode{display:inline-flex;border:1px solid #315c49;border-radius:18px;overflow:hidden;background:#fff}
.tl-mode-btn{min-height:32px;padding:4px 16px;border:0;background:none;color:#315c49;font-family:inherit;font-weight:700;font-size:12.5px;line-height:1.2;cursor:pointer}
.tl-mode-btn+.tl-mode-btn{border-left:1px solid #315c49}
.tl-mode-btn[aria-pressed="true"]{background:#315c49;color:#fffdf5}
.tl-mode-btn:focus-visible,.tl-recall-act:focus-visible{outline:3px solid #b5641a;outline-offset:2px}
.tl-mode-note{font-size:12.5px;color:#5d6e5f}
.tl-recall-bar{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}
.tl-recall-count{font-size:12.5px;color:#4a3418;padding:0 4px;font-variant-numeric:tabular-nums}.tl-recall-count b{color:#7a4a14}
.tl-recall-act{border-style:solid}
.tl-recall-act:disabled{opacity:.45;cursor:default}
.tl-recall-off{font-size:13px;color:#5d6e5f;margin:0;font-style:italic}
.tl-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tl-blank{display:inline-block;min-width:20px;padding:0 5px;border:1px dashed #b8c4ae;border-radius:8px;background:#f4f7ee;color:#75856b;font-weight:700;font-style:normal;text-align:center;line-height:16px;box-sizing:border-box}
.tl-item.is-span .tl-blank,.tl-item.is-compact .tl-blank{border:0;background:none;padding:0 6px;min-width:0}
.tl-item.is-compact .tl-blank{padding:0 0 0 1px;color:#8a6d43}
.tl-item.is-hidden:hover .tl-label{text-decoration:none}
.tl-item.is-hidden:hover .tl-blank,.tl-item.is-hidden:focus-visible .tl-blank{color:#7a4a14;border-color:#b5641a}
.tl-item.is-revealed .tl-label{text-decoration:underline dotted #b5641a 1.5px;text-underline-offset:3px}
.tl-item.is-compact.is-revealed .tl-label{text-decoration:none}
.tl-item.is-compact.is-revealed .tl-bar{box-shadow:inset 0 -2px 0 #b5641a}
.tl-dyn-head.is-hidden{padding:0;width:26px;text-align:center;border:1px dashed #c8d3bd;background:#fffdf8;color:#8b9a86;line-height:14px}
.tl-dyn-head.is-hidden:hover{color:#7a4a14;text-decoration:none;border-color:#b5641a}
.tl-dyn-head.is-revealed{text-decoration:underline dotted #b5641a 1.5px;text-underline-offset:2px}
.tl-row.is-hidden .tl-row-what b{color:#75856b}
.tl-row.is-revealed:not(.is-sel)>.tl-row-btn b{text-decoration:underline dotted #b5641a 1.5px;text-underline-offset:3px}
.tl-jump .tl-blank{margin-right:2px}
/* A just-revealed name fades in once; never with reduced motion. */
@keyframes tl-reveal{from{opacity:0}to{opacity:1}}
.is-fresh .tl-label,.tl-dyn-head.is-fresh,.tl-row.is-fresh .tl-row-what b{animation:tl-reveal .3s ease-out}
@media (prefers-reduced-motion:reduce){.is-fresh .tl-label,.tl-dyn-head.is-fresh,.tl-row.is-fresh .tl-row-what b{animation:none}}
@media (max-width:760px){.tl-mode-note{width:100%}.tl-recall-bar{width:100%}}

/* Chart view (timeline-chart.js): time runs down, one column per region, one band per century. A dynasty is a block
   with a dark square start (as its segments on the timeline); its kings follow, one full line each, with their years. */
.ch-tabs{margin:0 0 8px}
.ch-key{max-width:1200px;align-items:flex-start}.ch-key .tl-king-swatch{margin-top:3px}
.ch-none{position:static;display:block;margin:12px 0}
.ch-grid{display:grid;grid-template-columns:118px repeat(var(--cols),minmax(0,1fr));max-width:1200px;border:1px solid #dce4d5;border-radius:14px;background:#fffdf8}
.ch-head{display:contents}
.ch-col-head,.ch-corner{position:sticky;top:0;z-index:3;padding:9px 10px;background:#f7f8f1;border-bottom:1px solid #dce4d5;font:700 12px/1.3 ui-sans-serif,system-ui,sans-serif;color:#315c49}
.ch-corner{font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;color:#75856b;border-radius:14px 0 0 0}
.ch-col-head{border-left:1px solid #e3e7dc}.ch-col-head:last-child{border-radius:0 14px 0 0}
.ch-rule{padding:7px 10px;border-top:1px solid #dfe5d7;background:#f7f8f1;font-size:12px;line-height:1.3;color:#315c49}
.ch-rule b{display:block;font-weight:700}.ch-rule small{display:block;font-size:11px;color:#75856b;font-variant-numeric:tabular-nums}
.ch-cell{min-width:0;padding:5px 6px;border-top:1px solid #dfe5d7;border-left:1px solid #eef1e9;display:flex;flex-direction:column;gap:5px}
.ch-rule.is-empty,.ch-cell.is-empty{padding-top:3px;padding-bottom:3px;background:repeating-linear-gradient(135deg,#f7f8f1 0 6px,#fffdf8 6px 12px)}
.ch-rule.is-empty b{font-weight:600;font-size:11px}
.ch-seg{border-left:3px solid #7a4a14;border-radius:2px 8px 8px 2px;background:#fbf3e3;padding:1px 0 3px}
.ch-seg.is-cont{background:none;padding:0;border-left-color:#c9a978}
.ch-seg.is-cont:has(.ch-kings){background:#fdf8ee}
.ch-entry{display:flex;justify-content:space-between;align-items:baseline;gap:8px;width:100%;min-height:26px;padding:3px 8px;border:0;border-radius:4px;background:none;color:#263f36;font-family:inherit;font-size:13px;line-height:1.3;text-align:left;cursor:pointer}
.ch-name{min-width:0;font-weight:600;overflow-wrap:anywhere}
.ch-name small{font-size:11px;font-weight:500;font-style:italic;color:#8a7a5d;text-transform:none;letter-spacing:0}
.ch-when{flex:0 1 auto;max-width:52%;font-size:11.5px;color:#6d6248;text-align:right;font-variant-numeric:tabular-nums}
.ch-dyn .ch-name{font:700 11px/1.35 ui-sans-serif,system-ui,sans-serif;letter-spacing:.7px;text-transform:uppercase;color:#7a4a14}
.ch-dyn.is-cont{min-height:20px;padding-top:1px;padding-bottom:1px}
.ch-dyn.is-cont .ch-name{color:#9a8462;font-weight:600}
.ch-kings{list-style:none;margin:0;padding:0 0 0 8px}
.ch-king.is-co .ch-name{font-weight:500}
.ch-entry:hover{background:#f6e7c8}
.ch-entry:focus-visible{outline:3px solid #b5641a;outline-offset:-1px}
.ch-entry.is-sel{background:#b5641a;color:#fffdf5}.ch-entry.is-sel .ch-name,.ch-entry.is-sel .ch-when,.ch-entry.is-sel small{color:#fffdf5}
.ch-entry.is-dim{opacity:.4}
.ch-entry.is-lit:not(.is-sel){background:#f6e7c8}
/* Not taught here yet: hollow, dashed and italic, as on the timeline. */
.ch-seg.is-gap{border-left:2px dashed #8b9a86;background:#fffdf8;outline:1px dashed #c8d3bd;outline-offset:-1px}
.ch-seg.is-gap.is-cont{outline:0;background:none}
.ch-seg.is-gap .ch-name{font-style:italic;font-weight:500;color:#3f4f44}
.ch-seg.is-gap .ch-dyn .ch-name{color:#56665a;font-weight:600}
/* Recall in the chart: names blank, years kept. */
.ch-entry.is-hidden .ch-name{color:#75856b}
.ch-entry.is-revealed .ch-name{text-decoration:underline dotted #b5641a 1.5px;text-underline-offset:3px}
.ch-entry.is-fresh .ch-name{animation:tl-reveal .3s ease-out}
@media (prefers-reduced-motion:reduce){.ch-entry.is-fresh .ch-name{animation:none}}
/* The card opens in a side panel (a sheet from the bottom on phones). */
.tl-card-slot.is-drawer{position:fixed;z-index:20;right:16px;top:88px;width:min(400px,calc(100vw - 32px));max-height:calc(100vh - 108px);overflow:auto;margin:0;border-radius:12px;box-shadow:0 10px 30px rgba(38,63,54,.22)}
.tl-card-slot.is-drawer.is-idle{display:none}
@media (max-width:760px){
  .ch-grid.is-one{grid-template-columns:78px minmax(0,1fr)}
  .ch-rule{padding:6px 7px}
  .ch-entry{min-height:34px}
  .ch-dyn.is-cont{min-height:26px}
  .tl-card-slot.is-drawer:not(.is-idle){display:block;left:0;right:0;top:auto;bottom:0;width:auto;max-height:64vh;border-radius:14px 14px 0 0}
}
.ch-entry{scroll-margin-top:12px}
.ch-close{position:sticky;top:0;float:right;z-index:2;width:36px;height:36px;margin:6px 6px -42px 0;border:1px solid #c8d3bd;border-radius:50%;background:#fffdf8;color:#315c49;font:600 20px/1 ui-sans-serif,system-ui,sans-serif;cursor:pointer}
.ch-close:focus-visible{outline:3px solid #b5641a;outline-offset:2px}
.tl-card-slot.is-drawer .tl-card-meta{padding-right:40px}
@media (max-width:760px){.ch-rule small{display:none}.ch-rule b{font-size:11.5px}}

/* Drill mode (timeline-drill.js): one question at a time, an answer strip of bars on a small axis, a summary. */
.dr-host{max-width:760px}
.dr-card{border:1px solid #dfe4d6;border-radius:14px;background:#fffdf8;padding:20px 22px 18px}
.dr-count{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:0 0 6px;font-size:12px;font-weight:700;letter-spacing:.6px;color:#75856b;text-transform:uppercase}
.dr-practice{font-weight:600;letter-spacing:0;text-transform:none;color:#8a6a3a;font-size:12px}
.dr-again{color:#b5641a}
.dr-prompt,.dr-summary h2{font:22px/1.3 Georgia,serif;margin:4px 0 6px;color:#263f36}
.dr-prompt:focus,.dr-summary h2:focus{outline:none}
.dr-target{margin:4px 0 8px;padding:10px 12px;border-left:4px solid #b5641a;background:#f8f0df;border-radius:6px}
.dr-hint,.dr-howto{font-size:13px;color:#5d6e5f;margin:0 0 12px}
.dr-opts{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
.dr-two{grid-template-columns:1fr 1fr}
.dr-opt{width:100%;min-height:52px;display:flex;align-items:center;gap:12px;text-align:left;padding:10px 14px;border:1px solid #c8d3bd;border-radius:10px;background:#fff;color:#263f36;font:inherit;cursor:pointer}
.dr-opt:hover{border-color:#315c49}
.dr-opt:focus-visible,.dr-btn:focus-visible,.dr-link:focus-visible{outline:3px solid #b5641a;outline-offset:2px}
.dr-opt.is-placed{border-color:#315c49;background:#eef3e9}
.dr-num{flex:none;width:28px;height:28px;border-radius:50%;border:2px dashed #b8c4ad;display:grid;place-items:center;font-weight:700;color:#315c49}
.is-placed .dr-num{border:2px solid #315c49;background:#315c49;color:#fffdf5}
.dr-txt b,.dr-target b{font-weight:650;font-size:15px}
.dr-kind{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:9px;background:#eef1e8;color:#5d6e5f;font-size:11px;font-weight:600;vertical-align:1px}
.dr-gloss{display:block;font-size:12.5px;color:#5d6e5f;margin-top:2px}
.dr-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.dr-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
.dr-btn{min-height:40px;padding:8px 16px;border-radius:8px;border:1px solid #c8d3bd;background:#fff;color:#315c49;font:inherit;font-weight:650;font-size:14px;cursor:pointer}
.dr-btn.is-main{background:#315c49;border-color:#315c49;color:#fffdf5}
.dr-btn:disabled{opacity:.45;cursor:default}
.dr-feedback{margin:6px 0 10px;padding:10px 14px;border-radius:8px;font-size:15px}
.dr-feedback.is-right{background:#e4efdd;color:#244535}
.dr-feedback.is-wrong{background:#f8ead8;color:#6b3f12}
.dr-strip{margin:0 0 8px}.dr-strip svg{width:100%;height:auto;display:block}
.dr-strip figcaption{font-size:11.5px;color:#75856b}
.dr-tick{stroke:#e3e7dc;stroke-width:1}.dr-tick-label{font:11px ui-sans-serif,system-ui,sans-serif;fill:#75856b}
.dr-span{fill:#f3e3c8;opacity:.7}
.dr-bar{fill:#8fa88a}.dr-dot{fill:#8fa88a}
.dr-bar.is-answer,.dr-dot.is-answer{fill:#315c49}
.dr-bar.is-target{fill:#b5641a}
.dr-bar-label{font:12.5px ui-sans-serif,system-ui,sans-serif;fill:#263f36}
.dr-answers{list-style:none;margin:6px 0 10px;padding:0;display:grid;gap:4px}
.dr-answers li{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;padding:6px 0;border-top:1px solid #eceee6;font-size:14px}
.dr-answers li.is-target{font-style:italic}
.dr-li-name{font-weight:650}.dr-li-when{color:#5d6e5f}
.dr-li-mark{font-size:12px;color:#8a6a3a}.dr-li-mark.is-ok{color:#315c49;font-weight:700}
.dr-li-links{margin-left:auto;display:flex;gap:10px}
.dr-link{background:none;border:0;padding:0;font:inherit;font-size:12.5px;color:#315c49;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.dr-missed{margin:10px 0 0}.dr-missed-q{margin:0;font-size:13.5px;font-weight:650;color:#4d5e54}
.dr-summary h3{font-size:14px;margin:14px 0 2px;color:#315c49}
.dr-scope{font-size:13px;color:#5d6e5f}
.dr-empty{color:#5d6e5f}
@media (max-width:650px){.dr-card{padding:16px 14px}.dr-two{grid-template-columns:1fr}.dr-prompt,.dr-summary h2{font-size:19px}.dr-li-links{margin-left:0}}
@media (prefers-reduced-motion:reduce){.dr-opt{transition:none}}
