/* "Duomenų istorija" / "A history of data": an interactive feature (format = "html").
   From clay to code: warm clay tones for the ancient chapters, petrol and teal for the digital ones. */
.feature { --clay: #b9733f; --clay-2: #d9a173; --clay-soft: #f7efe6; --paper: #fbf8f3; --petrol: #0b303b; --teal: #087c75; --mint: #a7efce; --ink: #102e3a; --muted: #5c737b; --line: #e3e9e6; }
.feature { color: var(--ink); }
.feature p { margin: 0 0 1.15em; }

/* hero */
.dh-hero { position: relative; overflow: hidden; padding: 96px 36px 72px; background: linear-gradient(115deg, var(--paper) 0%, var(--clay-soft) 34%, #c9d6d2 62%, var(--petrol) 100%); }
.dh-hero-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; }
.dh-kicker { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--clay); margin: 0 0 18px !important; }
.dh-hero h1 { font-size: clamp(46px, 7vw, 92px); line-height: .95; letter-spacing: -.045em; font-weight: 850; margin: 0 0 22px; }
.dh-dek { font-size: clamp(19px, 2.2vw, 25px); line-height: 1.4; color: #2d4a54; max-width: 30ch; }
.dh-word { background: rgba(255, 255, 255, .78); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px; padding: 28px; box-shadow: 0 24px 60px -30px rgba(11, 48, 59, .45); }
.dh-word-big { font: 800 clamp(40px, 5vw, 64px)/1 var(--font); letter-spacing: -.03em; margin: 0 0 8px !important; transition: color .35s; }
.dh-word-big[data-state="b"] { color: var(--teal); }
.dh-word-big[data-state="a"] { color: var(--clay); }
.dh-word-gloss { color: var(--muted); min-height: 3.2em; font-size: 15px; }
.dh-switch { display: inline-flex; padding: 4px; border-radius: 99px; background: #eef3f1; border: 1px solid var(--line); gap: 2px; }
.dh-switch button { border: 0; background: none; padding: 9px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; color: var(--muted); }
.dh-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(11, 48, 59, .15); }

/* sticky timeline */
.dh-timeline { position: sticky; top: 78px; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.dh-timeline ol { list-style: none; margin: 0 auto; padding: 10px 24px; max-width: 1180px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.dh-timeline ol::-webkit-scrollbar { display: none; }
.dh-timeline a { display: flex; flex-direction: column; gap: 2px; padding: 7px 12px; border-radius: 10px; white-space: nowrap; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: background .2s, color .2s; }
.dh-timeline a b { font: 600 11px/1 var(--mono); color: var(--clay); }
.dh-timeline a.is-modern b { color: var(--teal); }
.dh-timeline a:hover { background: var(--soft, #f2f7f5); color: var(--ink); }
.dh-timeline a[aria-current="true"] { background: var(--ink); color: #fff; }
.dh-timeline a[aria-current="true"] b { color: var(--mint); }
.dh-progress { height: 3px; background: linear-gradient(90deg, var(--clay), var(--teal)); transform-origin: 0 50%; transform: scaleX(0); }

/* reading column and chapters */
.dh-body { padding: 24px 24px 40px; }
.dh-chapter { max-width: 720px; margin: 0 auto; padding-top: 72px; scroll-margin-top: 150px; font-size: 18.5px; line-height: 1.75; }
.dh-chapter h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 820; margin: 0 0 26px; }
.dh-chapter h2 small { display: block; font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--clay); margin-bottom: 14px; }
.dh-chapter.is-modern h2 small { color: var(--teal); }
.dh-chapter em { font-style: italic; }
.dh-chapter strong { color: var(--ink); }
.dh-quote { margin: 34px 0; padding: 26px 30px; border-left: 4px solid var(--clay); background: var(--clay-soft); border-radius: 0 16px 16px 0; font-size: 21px; line-height: 1.5; }
.dh-quote cite { display: block; margin-top: 12px; font: 600 13px/1 var(--mono); font-style: normal; color: var(--muted); }
.dh-pull { font-size: clamp(22px, 2.8vw, 30px); line-height: 1.35; font-weight: 750; letter-spacing: -.02em; margin: 40px 0 !important; padding-left: 22px; border-left: 4px solid var(--teal); }
.dh-list { padding-left: 1.2em; margin: 0 0 1.2em; }
.dh-list li { margin: .25em 0; }

/* figures (widgets) are wider than the text */
.dh-figure { max-width: 960px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 30px 70px -45px rgba(11, 48, 59, .45); }
.dh-figure.is-clay { background: var(--paper); border-color: #ecdccb; }
.dh-figure h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; }
.dh-figure .dh-hint { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.dh-figure figcaption { color: var(--muted); font-size: 13px; margin-top: 14px; }
.dh-note { display: inline-block; font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--clay); background: var(--clay-soft); padding: 3px 8px; border-radius: 6px; }
.dh-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: 10px 18px; font-weight: 700; font-size: 14px; transition: border-color .2s, background .2s; }
.dh-btn:hover { border-color: var(--teal); }
.dh-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.dh-btn.primary:hover { background: var(--teal); border-color: var(--teal); }
.dh-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dh-out { font: 600 14px/1.4 var(--mono); color: var(--teal); }

/* etymology */
.dh-tree { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px 18px; align-items: center; text-align: center; }
.dh-tree .root { grid-column: 1 / -1; justify-self: center; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 800; }
.dh-tree .root small { display: block; font-weight: 500; color: var(--mint); font-size: 12.5px; }
.dh-tree .branch { background: #fff; border: 1px solid #ecdccb; border-radius: 14px; padding: 14px; }
.dh-tree .branch b { display: block; font-size: 22px; letter-spacing: -.02em; }
.dh-tree .branch span { color: var(--muted); font-size: 13.5px; }
.dh-tree .eq { font: 700 26px/1 var(--mono); color: var(--clay); }

/* Euclid */
.dh-euclid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; }
.dh-euclid svg { width: 100%; height: auto; }
.dh-euclid .given { stroke: var(--clay); }
.dh-euclid .found { stroke: var(--teal); stroke-dasharray: 7 6; opacity: .25; transition: opacity .5s; }
.dh-euclid.is-solved .found { opacity: 1; }
.dh-euclid .lbl { font: 700 15px var(--font); }

/* tokens and tablet */
.dh-clay { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 26px; align-items: center; }
.dh-tokens { display: flex; flex-wrap: wrap; gap: 12px; }
.dh-token { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid #ecdccb; background: #fff; border-radius: 16px; padding: 14px 16px; min-width: 104px; font-size: 13px; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.dh-token:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(120, 70, 30, .6); }
.dh-token:active { transform: translateY(1px) scale(.97); }
.dh-token svg { width: 40px; height: 40px; }
.dh-tablet { position: relative; aspect-ratio: 4 / 3; border-radius: 30px; background: radial-gradient(120% 90% at 30% 20%, #e2b285, #c88b58 60%, #b67745); box-shadow: inset 0 -10px 24px rgba(90, 50, 20, .35), inset 0 6px 14px rgba(255, 230, 200, .5), 0 24px 40px -26px rgba(90, 50, 20, .8); padding: 22px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; }
.dh-tablet .imp { width: 46px; height: 46px; animation: dh-press .35s ease-out; }
.dh-tablet .imp svg { width: 100%; height: 100%; }
.dh-tablet .empty { color: rgba(80, 40, 15, .55); font-weight: 700; font-size: 14px; margin: auto; text-align: center; }
@keyframes dh-press { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dh-tally { margin-top: 12px; font: 600 14px/1.6 var(--mono); color: #6c4423; min-height: 1.6em; }

/* Graunt: records to pattern */
.dh-graunt { position: relative; height: 340px; border-radius: 16px; background: var(--paper); overflow: hidden; }
.dh-graunt .dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; transition: left .9s cubic-bezier(.6, 0, .2, 1), top .9s cubic-bezier(.6, 0, .2, 1); }
.dh-graunt .axis { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; display: grid; grid-template-columns: repeat(5, 1fr); opacity: 0; transition: opacity .4s .6s; }
.dh-graunt.is-grouped .axis { opacity: 1; }
.dh-graunt .axis span { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); padding-top: 12px; }
.dh-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dh-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* Snow: schematic map */
.dh-snow-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 22px; align-items: start; }
.dh-snow { width: 100%; height: auto; border-radius: 16px; background: #f4f1ea; }
.dh-snow .street { stroke: #fff; stroke-width: 14; stroke-linecap: round; }
.dh-snow .street-name { font: 700 11px var(--font); fill: #9a8f7f; letter-spacing: .04em; }
.dh-snow .death { transition: fill .5s; }
.dh-snow .pump circle { stroke: #fff; stroke-width: 3; }
.dh-snow .pump text { font: 800 11px var(--font); fill: var(--ink); }
.dh-snow .handle { transition: opacity .4s, transform .4s; transform-box: fill-box; transform-origin: center; }
.dh-snow.is-off .handle { opacity: 0; transform: translateY(-14px) rotate(-30deg); }
.dh-counts { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; }
.dh-counts li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dh-counts li b { margin-left: auto; font-family: var(--mono); }
.dh-counts i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dh-snow-side .dh-btn { width: 100%; margin-bottom: 8px; }

/* DIKW stepper */
.dh-dikw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dh-step { border-radius: 16px; padding: 20px; background: #f2f7f5; border: 1px solid var(--line); opacity: .35; transform: translateY(8px); transition: opacity .4s, transform .4s, background .4s; }
.dh-step.is-on { opacity: 1; transform: none; }
.dh-step small { display: block; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.dh-step p { margin: 0 !important; font-size: 16px; font-weight: 650; }
.dh-step:first-child p { font: 800 40px/1 var(--mono); letter-spacing: -.02em; }

/* Shannon */
.dh-shannon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; }
.dh-shannon svg { width: 100%; height: auto; }
.dh-shannon .curve { fill: none; stroke: var(--teal); stroke-width: 3; }
.dh-shannon .grid { stroke: var(--line); }
.dh-shannon .tick { font: 600 11px var(--mono); fill: var(--muted); }
.dh-coin { display: flex; gap: 10px; margin: 0 0 14px; }
.dh-coin span { flex: 1; text-align: center; padding: 12px 6px; border-radius: 12px; font-weight: 800; background: #f2f7f5; transition: background .3s; }
.dh-shannon input[type=range] { width: 100%; accent-color: var(--teal); }
.dh-bits { font: 800 44px/1 var(--mono); letter-spacing: -.02em; color: var(--ink); }
.dh-bits small { font-size: 16px; color: var(--muted); font-weight: 600; }

/* digital and machine eras */
.dh-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dh-card { border-radius: 18px; padding: 22px; background: linear-gradient(160deg, #fff, #f2f7f5); border: 1px solid var(--line); }
.dh-card b { display: block; font: 800 30px/1 var(--mono); color: var(--teal); letter-spacing: -.02em; margin-bottom: 10px; }
.dh-card h3 { font-size: 17px; margin: 0 0 8px; }
.dh-card p { font-size: 14.5px; line-height: 1.55; color: #36525c; margin: 0 !important; }
.dh-loop { position: relative; aspect-ratio: 16 / 7; border-radius: 18px; background: var(--petrol); overflow: hidden; display: grid; place-items: center; }
.dh-loop div { position: absolute; border: 2px solid rgba(167, 239, 206, .7); border-radius: 14px; animation: dh-shrink 6s linear infinite; }
.dh-loop span { position: relative; color: #fff; font-weight: 800; font-size: clamp(16px, 2vw, 22px); text-align: center; padding: 0 20px; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
@keyframes dh-shrink { from { width: 100%; height: 100%; opacity: 0; } 15% { opacity: 1; } to { width: 0%; height: 0%; opacity: 0; } }

/* ending */
.dh-end { max-width: 960px; margin: 70px auto 10px; border-radius: 26px; padding: 56px 40px; text-align: center; color: #fff; background: linear-gradient(120deg, #6d4426, var(--petrol) 70%); }
.dh-end p { font-size: clamp(22px, 3vw, 34px); line-height: 1.3; font-weight: 800; letter-spacing: -.02em; max-width: 26ch; margin: 0 auto !important; }
.dh-end small { display: block; margin-top: 16px; color: var(--mint); font: 600 13px/1 var(--mono); }
.dh-sources { max-width: 720px; margin: 54px auto 0; font-size: 15px; }
.dh-sources h2 { font-size: 20px; margin: 0 0 12px; }
.dh-sources ol { padding-left: 1.2em; color: #36525c; }
.dh-sources li { margin: 6px 0; }
.feature-foot { padding-top: 10px; }

@media (max-width: 860px) {
  .dh-hero { padding: 64px 20px 48px; }
  .dh-hero-inner, .dh-euclid, .dh-clay, .dh-snow-wrap, .dh-shannon { grid-template-columns: 1fr; }
  .dh-dikw, .dh-cards { grid-template-columns: 1fr; }
  .dh-body { padding: 10px 18px 30px; }
  .dh-chapter { font-size: 17px; padding-top: 52px; }
  .dh-figure { padding: 18px; border-radius: 18px; }
  .dh-graunt { height: 300px; }
  .dh-timeline { top: 64px; }
  .dh-end { padding: 40px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .feature *, .feature *::before, .feature *::after { animation: none !important; transition: none !important; }
}
