/* Verb references: room for the lexical form and a visible explanation category. */
/* Root tables are separate views; only the shared heading and tabs persist. */
[data-tab-panel="verb-root-table"][hidden],
.root-table-supplement[hidden] { display:none!important; }
.root-table-supplement > summary {
  cursor:pointer;
  color:var(--ink);
  font:600 25px/1.35 var(--serif);
}
.root-table-supplement[open] > summary { margin-bottom:12px; }
.worked-pattern-examples {
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  align-items:start;
  gap:14px;
  border:0;
  background:transparent;
}
.worked-pattern-rail {
  position:sticky;
  top:var(--root-rail-top,90px);
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  align-items:start;
  gap:6px;
}
.worked-pattern-rail .root-change-top-button { width:28px; height:28px; }
.worked-pattern-rail .worked-pattern-alphabet {
  position:static;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:3px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  overflow:visible;
}
.worked-pattern-rail .worked-pattern-alphabet button {
  min-height:0;
  height:clamp(30px,calc(var(--root-rail-height,650px) / 9 - 4px),47px);
}
.worked-pattern-rail .worked-pattern-alphabet span {
  font-family:var(--sanskrit-serif);
  font-size:18px;
  line-height:1.25;
}
.worked-pattern-rail .worked-pattern-alphabet small { font-size:9px; }
.worked-pattern-table-scroll { min-width:0; border:1px solid var(--line); border-radius:10px; }
.worked-pattern-table thead th { top:var(--root-rail-top,90px); }
.worked-pattern-table tbody tr { scroll-margin-top:calc(var(--root-rail-top,90px) + 70px); }

/* Five columns replace the clipped three-column alphabet. The full alphabet
   stays beside the root list, including its final signs, without an inner scroll. */
.root-change-index { grid-template-columns:260px minmax(0,1fr); }
.root-change-alphabet-rail { top:var(--root-rail-top,90px); }
.root-change-alphabet-rail .root-change-alphabet {
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:1px;
}
.root-change-alphabet-rail .root-change-alphabet button {
  min-height:0;
  height:clamp(30px,calc(var(--root-rail-height,650px) / 10 - 2px),44px);
  padding:2px;
  border:0;
  box-shadow:inset -1px -1px var(--line);
}
.root-change-alphabet-rail .root-change-alphabet span { font-size:18px; line-height:1.2; }
.root-change-alphabet-rail .root-change-alphabet small { font-size:9px; line-height:1; }
.root-change-list-row { scroll-margin-top:calc(var(--root-rail-top,90px) + 10px); }
@media(max-width:800px) {
  .root-change-index { grid-template-columns:150px minmax(0,1fr); }
  .root-change-alphabet-rail { grid-template-columns:1fr; gap:4px; }
  .root-change-alphabet-rail .root-change-alphabet { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .root-change-alphabet-rail .root-change-alphabet button { height:clamp(26px,calc((var(--root-rail-height,650px) - 45px) / 13),39px); }
  .root-change-alphabet-rail .root-change-alphabet span { font-size:16px; }
  .root-change-alphabet-rail .root-change-alphabet small { font-size:8px; }
  .worked-pattern-examples { grid-template-columns:110px minmax(0,1fr); gap:8px; }
  .worked-pattern-rail { grid-template-columns:1fr; gap:4px; }
  .worked-pattern-rail .worked-pattern-alphabet { grid-template-columns:repeat(3,minmax(0,1fr)); padding:3px; }
  .worked-pattern-rail .worked-pattern-alphabet button { height:clamp(28px,calc((var(--root-rail-height,650px) - 45px) / 12 - 4px),42px); }
  .worked-pattern-rail .worked-pattern-alphabet span { font-size:16px; }
  .worked-pattern-table-scroll { overflow-x:auto; }
  .worked-pattern-table { min-width:620px; }
  .worked-pattern-table thead th { position:static; }
}
@media(max-height:580px) and (min-width:801px) {
  .root-change-index { grid-template-columns:310px minmax(0,1fr); }
  .root-change-alphabet-rail .root-change-alphabet { grid-template-columns:repeat(7,minmax(0,1fr)); }
  .root-change-alphabet-rail .root-change-alphabet button { height:clamp(28px,calc(var(--root-rail-height,400px) / 7 - 2px),42px); }
}

.root-changes-content > .topic-heading > p:last-child {
  max-width:min(1160px,100%);
  text-align:left;
  text-wrap:pretty;
}
.irregular-definition-card {
  margin:0 0 24px;
}
.irregular-definition-card > div > p {
  background:var(--surface-raised);
  font-size:15px;
  line-height:1.6;
  padding:18px 20px;
}
.irregular-definition-card > div > p > strong {
  margin-bottom:8px;
  font-size:23px;
  line-height:1.25;
}
.irregular-definition-card > p:not(.kicker):not(.study-note) {
  font-size:16px;
  line-height:1.65;
}
.irregular-definition-card .study-note {
  font-size:16px;
  line-height:1.6;
}
.irregular-verb-table thead th:nth-child(1) { width:32%; }
.irregular-verb-table thead th:nth-child(2),
.irregular-verb-table thead th:nth-child(3),
.irregular-verb-table thead th:nth-child(4) { width:13%; }
.irregular-verb-table thead th:nth-child(5) { width:29%; }
.verb-grade-master thead th:nth-child(1) { width:36%; }
.verb-grade-master thead th:nth-child(2),
.verb-grade-master thead th:nth-child(3),
.verb-grade-master thead th:nth-child(4) { width:14%; }
.verb-grade-master thead th:nth-child(5) { width:22%; }
.irregular-verb-table .verb-dictionary-cell-layout,
.verb-grade-master .verb-dictionary-cell-layout {
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  gap:14px;
}
.irregular-verb-table .verb-dictionary-primary,
.verb-grade-master .verb-dictionary-primary {
  min-width:0;
  padding-right:14px;
}
.irregular-verb-table .verb-root-dev,
.verb-grade-master .verb-root-dev {
  max-width:100%;
  font-family:var(--sanskrit-serif);
  font-size:clamp(28px,2.3vw,36px);
  line-height:1.3;
  overflow-wrap:anywhere;
}
.irregular-verb-table .verb-root-iast,
.verb-grade-master .verb-root-iast {
  overflow-wrap:anywhere;
  line-height:1.3;
}
.irregular-verb-table .irregular-reason {
  font-size:14px;
  line-height:1.6;
}
.irregular-category-label {
  display:block;
  margin-bottom:9px;
  color:var(--orange-dark);
  font-family:var(--serif);
  font-size:21px;
  line-height:1.25;
}
.irregular-category-explanation {
  display:block;
}
.root-change-citation {
  flex-wrap:wrap;
}
.root-change-citation > span {
  flex:0 0 auto;
  max-width:100%;
  border-radius:18px;
  overflow-wrap:anywhere;
}
.root-change-citation > div {
  min-width:0;
  flex:1 1 260px;
}
.root-change-citation h3 {
  overflow-wrap:anywhere;
}
.root-change-variant {
  grid-template-columns:minmax(0,1fr) minmax(250px,.5fr);
}
@media(max-width:900px) {
  .irregular-definition-card > div > p { padding:15px 17px; }
  .irregular-definition-card > div > p > strong { font-size:21px; }
}
@media(max-width:680px) {
  .root-change-variant { grid-template-columns:1fr; }
  .root-change-citation > span { font-size:31px; }
  .root-change-citation > div { flex-basis:180px; }
}
