.tinta-page {
  --paper: #f6eddd;
  --white: #fffaf0;
  --ink: #182e42;
  --muted: #485767;
  --border: #988f80;
  --accent: #813431;
  --focus: #0c6e83;
  color: var(--ink);
  background: linear-gradient(150deg,#e9dcc2,var(--paper) 44rem);
  padding: clamp(1.25rem,4vw,3.8rem) 0;
}
.tinta-shell { max-width: 73rem; }
.tinta-page [hidden] { display: none !important; }
.tinta-page a { color: var(--accent); text-underline-offset: .18em; }
.tinta-page :focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.tinta-page .eyebrow { color: var(--accent); }
.tinta-back { display: inline-block; margin-bottom: 1.3rem; }
.tinta-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 1rem 3rem; margin-bottom: 1.45rem; }
.tinta-hero h1 { font-size: clamp(3rem,7vw,5.5rem); line-height: 1; margin: .2rem 0; }
.tinta-hero h1 em { color: var(--accent); }
.tinta-hero h2 { font-size: clamp(1.42rem,3.2vw,2.2rem); line-height: 1.16; margin: 0 0 .4rem; }
.tinta-hero p, .tinta-subtitle { margin: .35rem 0 0; color: var(--muted); }
.tinta-subtitle { font-size: 1.16rem; }
.tinta-lab {
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--white);
  padding: clamp(.85rem,2.6vw,1.65rem);
  box-shadow: 0 .6rem 1.5rem #69543d19;
}
.tinta-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: .55rem 1.2rem;
  padding-bottom: .9rem;
  margin-bottom: 1.05rem;
  border-bottom: 1px solid #c8beac;
}
.tinta-toolbar > div { width: min(100%,25rem); }
.tinta-toolbar p { margin: .35rem 0; font-weight: 750; color: var(--accent); }
.tinta-page label, .tinta-page legend { font-weight: 700; }
.tinta-toolbar select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  margin-top: .35rem;
  padding: .46rem .6rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}
.tinta-workbench { display: grid; grid-template-columns: minmax(15rem,1fr) minmax(0,2.15fr); gap: 1rem 1.6rem; }
.tinta-controls h2 { font-size: clamp(1.32rem,2.8vw,1.85rem); line-height: 1.16; margin: 0 0 .4rem; }
.tinta-controls p { margin: .42rem 0 .75rem; }
.tinta-lab fieldset { min-width: 0; margin: .65rem 0; padding: 0; border: 0; }
.tinta-radio { display: grid; gap: .38rem; margin-top: .35rem; }
.tinta-radio label {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .65rem;
  min-height: 2.65rem;
  background: #fbf5e8;
  border: 1px solid var(--border);
  border-radius: .55rem;
  cursor: pointer;
}
.tinta-radio label:has(:checked) { background: #f4e1bf; border-color: #695238; }
.tinta-radio label:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.tinta-radio input { flex: none; accent-color: var(--accent); margin: 0; inline-size: 1.05rem; block-size: 1.05rem; }
.tinta-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.tinta-page button, .tinta-share-action, .tinta-book .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .46rem .78rem;
  border: 1px solid #807568;
  border-radius: .55rem;
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
  font-weight: 730;
  text-decoration: none;
  cursor: pointer;
}
.tinta-page button:hover, .tinta-page a.tinta-share-action:hover, .tinta-page .tinta-book .button:hover { background: #f1dfc1; color: var(--ink); }
.tinta-page .tinta-primary, .tinta-page .tinta-book .button-primary { background: var(--ink); color: white; border-color: var(--ink); }
.tinta-page .tinta-primary:hover, .tinta-page .tinta-book .button-primary:hover { background: #305069; color: white; }
.tinta-page button[aria-pressed="true"] { background: #d7eef1; border-color: #2f6974; }
.tinta-board {
  min-width: 0;
  border: 1px solid #b1a28d;
  border-radius: .88rem;
  padding: clamp(.58rem,2vw,1rem);
  background: #eaddc6;
}
.tinta-board-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .7rem; }
.tinta-board h3, .tinta-board p { margin: 0; }
.tinta-board-heading h3 { line-height: 1.15; }
.tinta-board-heading p { font-size: .92rem; color: var(--muted); margin-top: .22rem; }
.tinta-strips { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .5rem; }
.tinta-strips[data-count="1"] { grid-template-columns: minmax(9rem,13rem); justify-content: center; }
.tinta-trace { margin: 0; min-width: 0; }
.tinta-trace figcaption { font-weight: 750; line-height: 1.16; margin-bottom: .38rem; }
.tinta-trace[data-sample] figcaption { color: var(--accent); }
.tinta-strip {
  position: relative;
  height: 12rem;
  overflow: hidden;
  border: 1px solid #978c7a;
  border-radius: .44rem;
  background: repeating-linear-gradient(0deg,#f8f4e8 0 17px,#ded7c9 17px 18px);
  box-shadow: inset .35rem 0 .75rem #a1957c23;
}
.tinta-strip::after { content: ''; position: absolute; left: 0; right: 0; bottom: 12%; border-top: 2px solid #51505a; }
.tinta-water {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 7%;
  background: #b1d9e7;
  border-top: 2px solid #42758b;
}
.tinta-strip[data-water="high"] .tinta-water { height: 20%; }
.tinta-spot {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translate(-50%,50%);
  width: .85rem;
  height: .62rem;
  border-radius: 50%;
  z-index: 1;
  background: #292738;
}
.tinta-strip[data-state="smudge"] .tinta-spot { width: 76%; height: 1.55rem; background: radial-gradient(ellipse,#555674b0 5%,#55567455 45%,transparent 73%); }
.tinta-front { position: absolute; left: 2%; right: 2%; bottom: var(--mark); border-top: 2px dashed #286d82; }
.tinta-axis { position: absolute; right: .32rem; bottom: var(--mark); color: #244b5c; font-size: .74rem; font-weight: 800; line-height: 1; }
.tinta-axis-start { transform: translateY(calc(100% + 3px)); }
.tinta-axis-end { transform: translateY(-3px); }
.tinta-band {
  position: absolute;
  bottom: var(--mark);
  left: 8%;
  width: 84%;
  height: .95rem;
  transform: translateY(50%);
  display: grid;
  justify-items: center;
  align-items: center;
  border: 1px solid #575260;
  border-radius: .3rem;
  color: #151b27;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
}
.tinta-band[data-color="orange"] { background: repeating-linear-gradient(120deg,#f2bf61 0 8px,#ffe0a2 8px 13px); }
.tinta-band[data-color="rose"] { background: repeating-linear-gradient(0deg,#eca8b5 0 3px,#f9cdda 3px 6px); }
.tinta-band[data-color="blue"] { background: repeating-linear-gradient(90deg,#a1c9ef 0 4px,#d3e7fb 4px 9px); }
.tinta-band[data-color="violet"] { background: repeating-linear-gradient(135deg,#c8b0ed 0 3px,#e7d8f8 3px 7px); }
.tinta-trace ul { list-style: none; margin: .38rem 0 0; padding: 0; font-size: .88rem; line-height: 1.38; }
.tinta-trace li:first-child { font-weight: 750; }
.tinta-board .tinta-note { margin-top: .65rem; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.tinta-answer { margin-top: .85rem; }
.tinta-choices { grid-template-columns: repeat(3,minmax(0,1fr)); }
.tinta-hint, #tinta-feedback:not(:empty) { border-left: 3px solid var(--focus); background: #e3eef1; padding: .6rem .75rem; margin: .5rem 0 0; }
#tinta-feedback[data-solved="true"] { border-color: #36764c; background: #e0f0df; }
.tinta-science, .tinta-share, .tinta-book { margin-top: 1.1rem; padding: clamp(.9rem,2.5vw,1.55rem); border: 1px solid var(--border); border-radius: .88rem; background: var(--white); }
.tinta-science h2, .tinta-share h2, .tinta-book h2 { margin: 0 0 .45rem; line-height: 1.18; }
.tinta-science p, .tinta-share p, .tinta-book p { max-width: 70ch; margin: .38rem 0; color: var(--muted); }
.tinta-page summary { cursor: pointer; color: var(--accent); padding: .4rem 0; }
.tinta-share blockquote { margin: .6rem 0; border-left: 3px solid var(--accent); padding-left: .72rem; }
.tinta-share-actions, .tinta-book-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.tinta-share textarea { width: min(100%,41rem); padding: .55rem; border: 1px solid var(--border); border-radius: .45rem; color: var(--ink); background: white; font: inherit; }
.tinta-book { display: grid; grid-template-columns: minmax(5rem,8.2rem) minmax(0,1fr); align-items: center; gap: clamp(.8rem,3vw,1.65rem); }
.tinta-book-cover { width: 100%; height: auto; border-radius: .25rem; box-shadow: 0 .45rem .8rem #40362936; }
@media (max-width: 54rem) {
  .tinta-workbench { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 38rem) {
  .tinta-hero { grid-template-columns: minmax(0,1fr); }
  .tinta-strips { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem .5rem; }
  .tinta-choices { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 24rem) {
  .tinta-book { grid-template-columns: minmax(0,1fr); }
  .tinta-book-cover { max-width: 6.2rem; }
}
