/* ācta guide: bond sheets filed in manila folders.
   An article is a bond sheet with every folder's tab along its top edge, its
   own folder's tab in front, a plain index at left, and "On this page" at
   right. Loads after marketing.css. */

/* ---------- Article ---------- */

.g-binder {
  width: var(--wrap);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 8vw, 120px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 188px;
  column-gap: clamp(28px, 3vw, 44px);
  align-items: start;
}
.g-binder--no-toc { grid-template-columns: 220px minmax(0, 1fr); }
.g-filed { min-width: 0; padding-top: 42px; }

/* The index: one plain level per line. Group names are captions, pages are
   links under them, and the page on screen is bold with an ink square. */
.g-index {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding-top: 42px;
  scrollbar-width: thin;
}
.g-index__toggle { display: none; }
.g-index__toggle::-webkit-details-marker { display: none; }
.g-index__group + .g-index__group { margin-top: 26px; }
.g-index__name {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--folder-edge);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.g-index ul { margin-top: 4px; }
.g-index li a {
  position: relative;
  display: block;
  padding: 6px 0 6px 16px;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}
.g-index li a:hover { text-decoration: underline; }
.g-index li a[aria-current='page'] { font-weight: 700; }
.g-index li a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.85em;
  width: 7px;
  height: 7px;
  background: var(--ink);
}

/* The folder tabs: every folder's tab along the sheet's top edge, left
   aligned and touching. The page's own folder is in front: its tab is bond and
   joins the sheet with no line between them. */
.g-folders {
  position: absolute;
  left: -1px;
  bottom: 100%;
  display: flex;
  align-items: flex-end;
}
.g-folders__tab {
  position: relative;
  margin-right: -1px;
  padding: 8px 16px 7px;
  background: var(--manila-deep);
  border: 1px solid var(--folder-edge);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.g-folders__tab:hover { color: var(--ink); background: color-mix(in srgb, var(--manila-deep) 70%, var(--bond)); }
.g-folders__tab:focus-visible { outline-offset: -3px; z-index: 2; }
.g-folders__tab--own {
  z-index: 1;
  margin-bottom: -1px;
  padding: 11px 16px 9px;
  background: var(--bond);
  border-color: var(--sheet-edge);
  color: var(--ink);
}
.g-folders__tab--own:hover { background: var(--bond); }

/* The sheet */

.g-sheet {
  position: relative;
  padding: clamp(28px, 4vw, 56px);
  padding-top: clamp(32px, 4vw, 52px);
  background: var(--bond);
  border: 1px solid var(--sheet-edge);
  border-radius: 2px;
  box-shadow: 0 2px 0 rgba(90, 70, 20, 0.08), 0 40px 80px -40px rgba(60, 45, 10, 0.5);
  overflow-wrap: break-word;
}

.g-title {
  max-width: 22ch;
  font-size: clamp(2rem, 1.35rem + 1.9vw, 2.875rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.g-beta {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* The title block closes with a double rule, as a register heading does. */
.g-body {
  margin-top: 26px;
  padding-top: 6px;
  border-top: 3px double var(--ink);
  max-width: 68ch;
  font-family: var(--font-doc);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
}

.g-h2 {
  margin: 2.1em 0 0;
  font-family: var(--font-forms);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.016em;
  text-wrap: balance;
}
.g-p { margin-top: 0.85em; text-wrap: pretty; }
.g-h2 + .g-p { margin-top: 0.5em; }

/* An on-screen label is set in the forms face, as the app shows it. */
.g-body [data-guide-emphasis] {
  font-family: var(--font-forms);
  font-size: 0.93em;
  font-weight: 650;
}
.g-body [data-guide-page-link] {
  font-weight: 600;
  text-decoration-thickness: 1px;
}
.g-body [data-guide-page-link]:hover { text-decoration-thickness: 2px; }

.g-list,
.g-steps { margin-top: 0.85em; }
.g-list > li,
.g-steps > li { position: relative; margin-top: 0.5em; }

.g-list > li { padding-left: 1.4em; }
.g-list > li::before {
  content: '';
  position: absolute;
  left: 0.2em;
  top: 0.68em;
  width: 6px;
  height: 6px;
  background: var(--ink-2);
}

.g-steps { counter-reset: step; }
.g-steps > li {
  counter-increment: step;
  padding-left: 2.1em;
}
.g-steps > li::before {
  content: counter(step) '.';
  position: absolute;
  left: 0;
  top: 0.12em;
  font-family: var(--font-forms);
  font-weight: 800;
  font-size: 0.9375rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Callouts are form notes. The kind sits in a small tab on the note's top
   edge, as a folder's name does. Planned is drawn dashed: direction, not
   record. */
.g-callout {
  position: relative;
  margin: 2.6em 0 1.6em;
  padding: 16px 20px 18px;
  border: 1px solid;
  border-radius: 0 3px 3px 3px;
}
.g-callout__label {
  position: absolute;
  bottom: 100%;
  left: -1px;
  padding: 4px 11px 3px;
  background: inherit;
  border: inherit;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  font-family: var(--font-forms);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.g-callout--planned .g-callout__label { background: var(--bond); }
.g-callout__title {
  font-family: var(--font-forms);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}
.g-callout__title + .g-callout__text { margin-top: 4px; }
.g-callout__text { font-size: 1.0625rem; line-height: 1.6; }
.g-callout--note { background: var(--flash-info-fill); border-color: var(--focus); }
.g-callout--note .g-callout__label { color: var(--flash-info-text); }
.g-callout--limitation { background: var(--flash-warning-fill); border-color: var(--due); }
.g-callout--limitation .g-callout__label { color: var(--flash-warning-text); }
.g-callout--planned { background: transparent; border: 1.5px dashed var(--ink-2); }
.g-callout--planned .g-callout__label { color: var(--ink-2); }

.g-links { margin-top: 1em; border-top: 1px solid var(--bond-rule); }
.g-links li { border-bottom: 1px solid var(--bond-rule); }
.g-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  font-family: var(--font-forms);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
}
.g-links a:hover { text-decoration: underline; }
.g-links svg { flex: none; color: var(--ink-2); }

.g-updated {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--bond-rule);
  font-size: 0.875rem;
  color: var(--ink-2);
}
.g-updated time {
  font-family: var(--font-type);
  color: var(--stamp);
  font-variant-numeric: tabular-nums;
}

/* Previous and next, as buttons under the sheet. Next is the primary
   action in index green; Previous is the outlined button. */
.g-pager {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.g-pager__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 20px;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.g-pager__btn:active { transform: translateY(1px); }
.g-pager__btn--prev {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.g-pager__btn--prev:hover { background: rgba(25, 28, 25, 0.06); }
.g-pager__btn--next {
  justify-content: flex-end;
  text-align: right;
  background: var(--green);
  color: var(--bond);
  box-shadow: 0 1px 0 rgba(10, 25, 15, 0.35), 0 8px 18px -10px rgba(10, 25, 15, 0.55);
}
.g-pager__btn--next:hover { background: var(--green-deep); }
.g-pager__btn--next:focus-visible { outline-color: var(--focus); }
.g-pager__text { display: grid; gap: 2px; min-width: 0; }
.g-pager__dir { font-size: 0.8125rem; font-weight: 600; opacity: 0.85; }
.g-pager__title {
  font-size: 1.0625rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.g-pager__arrow { flex: none; }

/* On this page */
.g-toc {
  position: sticky;
  top: 92px;
  padding-top: 42px;
}
.g-toc__title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.g-toc a {
  position: relative;
  display: block;
  padding: 7px 0 7px 14px;
  border-bottom: 1px solid var(--folder-edge);
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
}
.g-toc a:hover { color: var(--ink); text-decoration: underline; }
.g-toc a[aria-current='location'] { color: var(--ink); font-weight: 700; }
.g-toc a[aria-current='location']::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 0.95em;
  width: 6px;
  height: 6px;
  background: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .g-binder,
  .g-binder--no-toc { grid-template-columns: 210px minmax(0, 1fr); }
  .g-toc { display: none; }
}

/* The index becomes a disclosure above the sheet. It opens downward, so
   nothing above it moves. */
@media (max-width: 900px) {
  .g-binder,
  .g-binder--no-toc { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .g-index {
    position: static;
    max-height: none;
    overflow: visible;
    padding-top: 0;
  }
  .g-index__toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    background: var(--bond);
    border: 1.5px solid var(--ink);
    border-radius: 3px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }
  .g-index__toggle-where {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--ink-2);
  }
  .g-index__chev { transition: transform 180ms var(--ease-out); }
  .g-index[open] .g-index__chev { transform: rotate(180deg); }
  .g-index__nav {
    margin-top: 8px;
    padding: 16px;
    background: var(--bond);
    border: 1px solid var(--sheet-edge);
    border-radius: 2px;
  }
  .g-index li a { padding-block: 9px; }
  .g-filed { padding-top: 52px; }
}

@media (max-width: 640px) {
  .g-folders__tab { padding: 7px 9px 6px; font-size: 0.8125rem; }
  .g-folders__tab--own { padding: 9px 9px 8px; }
  .g-sheet { padding: 26px 16px 22px; }
  .g-body { font-size: 1.0625rem; }
  .g-h2 { font-size: 1.3125rem; }
  .g-callout { padding: 14px 16px 16px; }
  .g-pager { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .g-pager > span[aria-hidden] { display: none; }
}


@media print {
  .g-index, .g-toc, .g-pager, .g-folders { display: none; }
  .g-binder { display: block; }
  .g-sheet { box-shadow: none; border: 0; }
}
