/*
 * Trading Boy — brutalist theme. Hard edges, no radius, no gradients, thick
 * black borders, chunky offset shadows, monospace data. Brand orange/blue from
 * the logo serve as the loud accents against ink-black structure.
 */

:root {
  --tb-orange:        #f7991c;
  --tb-orange-deep:   #e2540b;
  --tb-gold:          #ffc23d;
  --tb-blue:          #3f9bcf;
  --tb-blue-light:    #bfe3f5;
  --tb-navy:          #14222c;
  --tb-ink:           #0b0f12;
  --tb-paper:         #f3f1e8;
  --tb-surface:       #ffffff;
  --tb-text:          #0b0f12;
  --tb-muted:         #555f66;
  --tb-pos:           #138a3e;
  --tb-neg:           #d11f12;
  --tb-shadow:        5px 5px 0 var(--tb-ink);
  --tb-shadow-sm:     3px 3px 0 var(--tb-ink);
  --tb-border:        3px solid var(--tb-ink);
  --tb-mono:          ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tb-text);
  background: var(--tb-paper);
  -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.tb-header {
  background: var(--tb-surface);
  border-bottom: 5px solid var(--tb-ink);
}
.tb-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tb-logo { display: inline-flex; align-items: center; }
.tb-logo__img { height: 60px; width: auto; display: block; }
.tb-logo__img--mobile { display: none; }
/* Hard-stop colour band — no gradient. */
.tb-header__accent {
  height: 10px;
  background: var(--tb-orange);
}

.tb-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.tb-nav__link {
  color: var(--tb-ink);
  text-decoration: none;
  font-weight: 800;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tb-nav__link:hover { color: var(--tb-orange-deep); text-decoration: underline; text-decoration-thickness: 3px; }
.tb-nav__link.is-active { color: var(--tb-orange-deep); text-decoration: underline; text-decoration-thickness: 3px; }

/* --- Nav dropdowns --- */
.tb-dropdown { position: relative; display: flex; align-items: center; }
.tb-dropdown__toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.tb-dropdown__menu {
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  min-width: 180px;
  z-index: 40;
  background: var(--tb-surface);
  border: var(--tb-border);
  box-shadow: var(--tb-shadow-sm);
}
.tb-dropdown__link {
  display: block;
  padding: .65rem .9rem;
  color: var(--tb-ink);
  text-decoration: none;
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--tb-ink);
}
.tb-dropdown__link:last-child { border-bottom: none; }
.tb-dropdown__link:hover { background: var(--tb-gold); }
.tb-dropdown__menu form { margin: 0; }
.tb-dropdown__signout {
  display: block;
  width: 100%;
  text-align: left;
  padding: .65rem .9rem;
  background: var(--tb-ink);
  color: var(--tb-surface);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tb-dropdown__signout:hover { background: #c0392b; }

/* --- Buttons --- */
.tb-btn {
  display: inline-block;
  border: var(--tb-border);
  border-radius: 0;
  padding: .6rem 1.15rem;
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  text-decoration: none;
  background: var(--tb-surface);
  color: var(--tb-ink);
  box-shadow: var(--tb-shadow-sm);
  transition: transform .04s ease, box-shadow .04s ease;
}
.tb-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--tb-ink); }
.tb-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--tb-ink); }
.tb-btn--primary { background: var(--tb-orange); color: var(--tb-ink); }
.tb-btn--ghost { background: var(--tb-surface); color: var(--tb-ink); }
.tb-btn--danger { background: var(--tb-ink); color: var(--tb-surface); }
.tb-btn--danger:hover { background: #c0392b; }

/* Inline row actions: keep button_to forms on one line */
.row-actions { display: flex; gap: .4rem; align-items: center; }
.row-actions form { margin: 0; }

/* --- Layout --- */
.tb-main { max-width: 1080px; margin: 0 auto; padding: 1.75rem 1.25rem; }

/* --- Flash --- */
.tb-flash { border: var(--tb-border); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .9rem; font-weight: 700; box-shadow: var(--tb-shadow-sm); }
.tb-flash--notice { background: var(--tb-gold); color: var(--tb-ink); }
.tb-flash--alert  { background: var(--tb-neg); color: #fff; }

/* --- Dashboard --- */
.dash__head { display: flex; align-items: center; gap: .75rem; margin-bottom: .25rem; }
.dash__head h1 { font-size: 2.25rem; margin: 0; color: var(--tb-ink); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.dash__sub { color: var(--tb-muted); margin: .15rem 0 0; font-family: var(--tb-mono); font-size: .85rem; }

.badge { display: inline-block; font-size: .72rem; font-weight: 900; letter-spacing: .08em; padding: .25rem .6rem; border: var(--tb-border); text-transform: uppercase; }
.badge--paper { background: var(--tb-orange); color: var(--tb-ink); }
.badge--live  { background: var(--tb-blue); color: var(--tb-ink); }
.badge--real  { background: var(--tb-neg); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.card {
  background: var(--tb-surface);
  border: var(--tb-border);
  border-radius: 0;
  padding: 1.1rem;
  box-shadow: var(--tb-shadow);
  min-width: 0;
}
/* A standalone stat card that hugs its content instead of filling the row. */
.card--fit { display: inline-block; min-width: 220px; margin-top: 1rem; }
.card__label { font-family: var(--tb-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tb-muted); font-weight: 700; }
.card__value { font-family: var(--tb-mono); font-size: 1.6rem; font-weight: 800; margin-top: .4rem; color: var(--tb-ink); }

.section-title { font-size: 1.25rem; color: var(--tb-ink); margin: 1.75rem 0 .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }

.chart-wrap { height: 420px; background: var(--tb-surface); border: var(--tb-border); box-shadow: var(--tb-shadow); touch-action: none; }

/* --- Full-screen chart workspace (charts#show) --- */
.chart-body { margin: 0; padding: 0; background: var(--tb-bg); }
.chart-workspace { display: flex; flex-direction: column; height: 100dvh; }
.chart-topbar { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; border-bottom: var(--tb-border); background: var(--tb-surface); flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-topbar__back { font-family: var(--tb-mono); font-size: 1.3rem; line-height: 1; text-decoration: none; color: var(--tb-ink); padding: .2rem .55rem; border: var(--tb-border); flex: 0 0 auto; }
.chart-topbar__symbol { flex: 0 0 auto; }
.chart-topbar__input { font-family: var(--tb-mono); font-size: 16px; width: 6.5rem; padding: .3rem .5rem; border: var(--tb-border); text-transform: uppercase; }
.chart-topbar__periods { display: flex; gap: .15rem; flex: 0 0 auto; }
.chart-period { font-family: var(--tb-mono); font-size: .78rem; padding: .35rem .5rem; min-height: 34px; background: var(--tb-surface); border: var(--tb-border); cursor: pointer; white-space: nowrap; }
.chart-period:hover { background: rgba(0,0,0,0.04); }
.chart-period.is-active { background: var(--tb-ink); color: var(--tb-surface); }
.chart-topbar__spacer { flex: 1 1 auto; }
.chart-tool--labeled { font-family: var(--tb-mono); padding: .35rem .6rem; }
.chart-indicators { flex: 0 0 auto; }
/* Fixed, not absolute: the topbar is a scroll container (overflow-x: auto),
   which would clip an absolutely-positioned dropdown. */
.chart-indicators__panel { position: fixed; top: 3.2rem; left: .5rem; z-index: 30; display: flex; gap: 1rem; padding: .75rem; background: var(--tb-surface); border: var(--tb-border); box-shadow: var(--tb-shadow); max-height: 70dvh; overflow-y: auto; }
/* display: flex above would override the UA's [hidden] rule and leave the
   "closed" panel painted (and swallowing clicks). */
.chart-indicators__panel[hidden] { display: none; }
.chart-indicators__group { min-width: 11rem; }
.chart-indicators__title { font-family: var(--tb-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(0,0,0,0.5); margin-bottom: .4rem; }
.chart-indicators__item { display: flex; align-items: center; justify-content: space-between; gap: .45rem; font-family: var(--tb-mono); font-size: .82rem; padding: .3rem 0; white-space: nowrap; }
.chart-indicators__check { display: flex; align-items: center; gap: .45rem; cursor: pointer; }
.chart-indicators__params { font-family: var(--tb-mono); font-size: .78rem; width: 6.5rem; padding: .2rem .35rem; border: var(--tb-border); }
@media (max-width: 700px) {
  .chart-indicators__panel { right: .5rem; flex-direction: column; gap: .5rem; }
}
.chart-workspace__main { display: flex; flex: 1 1 auto; min-height: 0; }
.chart-sidebar { flex: 0 0 auto; border-right: var(--tb-border); background: var(--tb-surface); overflow-y: auto; }
.chart-sidebar .chart-toolbar { flex-direction: column; overflow-x: visible; padding: .25rem; margin: 0; }
.chart-sidebar .chart-toolbar__spacer { border-left: none; border-top: var(--tb-border); flex: 0 0 .5rem; width: 100%; }
.chart-surface { flex: 1 1 auto; min-width: 0; background: var(--tb-surface); touch-action: none; }
.chart-surface[data-error]::after { content: "Chart unavailable: " attr(data-error); display: block; padding: 1rem; font-family: var(--tb-mono); color: var(--tb-ink); }
.chart-workspace__empty { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; }

@media (max-width: 700px) {
  .chart-workspace__main { flex-direction: column; }
  .chart-sidebar { border-right: none; border-bottom: var(--tb-border); overflow-y: visible; }
  .chart-sidebar .chart-toolbar { flex-direction: row; overflow-x: auto; }
  .chart-sidebar .chart-toolbar__spacer { border-top: none; border-left: var(--tb-border); width: auto; flex: 0 0 .5rem; }
}

/* Top 8 grid + journal notes */
.top-eight { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .6rem; }
.top-eight__slot { position: relative; display: flex; align-items: center; justify-content: center; min-height: 64px; background: var(--tb-surface); border: var(--tb-border); box-shadow: var(--tb-shadow); font-family: var(--tb-mono); }
.top-eight__slot--empty { color: rgba(0,0,0,0.25); box-shadow: none; }
.top-eight__name { text-decoration: none; font-weight: 700; }
.top-eight__remove { position: absolute; top: 2px; right: 4px; background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--tb-neg); }
.journal-entry { margin-bottom: .6rem; }
.journal-entry__meta { font-family: var(--tb-mono); font-size: .72rem; color: rgba(0,0,0,0.5); display: flex; justify-content: space-between; margin-bottom: .3rem; }
.journal-entry__delete { background: none; border: none; color: var(--tb-neg); font-family: var(--tb-mono); font-size: .72rem; cursor: pointer; }
@media (max-width: 700px) { .top-eight { grid-template-columns: repeat(2, 1fr); } }

/* Drawing toolbar: single scrollable row, finger-sized targets on touch. */
.chart-toolbar { display: flex; align-items: center; gap: .25rem; overflow-x: auto; padding-bottom: .35rem; margin-bottom: .35rem; -webkit-overflow-scrolling: touch; }
.chart-tool { font-family: var(--tb-mono); font-size: .78rem; padding: .35rem; min-height: 34px; min-width: 34px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; background: var(--tb-surface); border: var(--tb-border); cursor: pointer; }
.chart-tool svg { display: block; }
.chart-tool svg .f { fill: currentColor; stroke: none; }
.chart-tool:hover { background: rgba(0,0,0,0.04); }
.chart-tool.is-active { background: var(--tb-ink); color: var(--tb-surface); }
.chart-tool--muted { color: rgba(0,0,0,0.55); }
.chart-toolbar__spacer { flex: 0 0 .75rem; border-left: var(--tb-border); align-self: stretch; }
.chart-toolbar__status { font-family: var(--tb-mono); font-size: .75rem; color: rgba(0,0,0,0.5); white-space: nowrap; }
.chart-wrap[data-error]::after { content: "Chart unavailable: " attr(data-error); display: block; padding: 1rem; font-family: var(--tb-mono); color: var(--tb-ink); }
.chart-wrap--short { height: 280px; }
.chart-legend { display: flex; gap: 1.25rem; margin-bottom: .5rem; font-family: var(--tb-mono); font-size: .85rem; }
.chart-legend__item { display: flex; align-items: center; gap: .4rem; }
.chart-swatch { width: 14px; height: 3px; display: inline-block; }
.chart-swatch--entry { background: #1a1a1a; }
.chart-swatch--stop { background: #c0392b; }
.chart-swatch--target { background: #2e7d32; }
.chart-swatch--buy { background: var(--tb-pos); }
.chart-swatch--sell { background: var(--tb-neg); }
.chart-swatch--shadow { background: #8a919a; }

/* overflow-x lets wide tables scroll sideways on small screens instead of
   clipping columns (row action buttons must stay reachable on phones). */
.table-wrap { background: var(--tb-surface); border: var(--tb-border); border-radius: 0; overflow-x: auto; box-shadow: var(--tb-shadow); }
table.tb-table { width: 100%; border-collapse: collapse; font-family: var(--tb-mono); }
.tb-table th, .tb-table td { text-align: right; padding: .7rem .9rem; font-size: .9rem; border-bottom: 2px solid var(--tb-ink); white-space: nowrap; }
.tb-table th { background: var(--tb-ink); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.tb-table th:first-child, .tb-table td:first-child { text-align: left; }
.tb-table tr:last-child td { border-bottom: none; }
.pos { color: var(--tb-pos); font-weight: 800; }
.neg { color: var(--tb-neg); font-weight: 800; }
.muted { color: var(--tb-muted); }

.notice-box { background: var(--tb-gold); border: var(--tb-border); border-radius: 0; padding: 1rem; box-shadow: var(--tb-shadow-sm); font-weight: 600; }
.error-box  { background: var(--tb-neg); border: var(--tb-border); border-radius: 0; padding: 1rem; color: #fff; box-shadow: var(--tb-shadow-sm); font-weight: 600; }
code { background: var(--tb-ink); color: #fff; padding: .1rem .35rem; border-radius: 0; font-size: .85em; font-family: var(--tb-mono); }

/* --- Auth card --- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tb-paper);
}
.auth { width: 100%; max-width: 420px; margin: 2rem auto; padding: 0 1rem; }
.auth__brand { text-align: center; margin-bottom: -0.5rem; }
.auth__logo { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto; }
.auth__card { background: var(--tb-surface); border: var(--tb-border); border-radius: 0; padding: 2rem; box-shadow: var(--tb-shadow); }
.auth__title { text-align: center; color: var(--tb-ink); margin: 0 0 1.5rem; font-size: 1.4rem; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
.auth__field { margin-bottom: 1.1rem; }
.auth__field label { display: block; font-family: var(--tb-mono); font-size: .75rem; font-weight: 700; color: var(--tb-ink); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .06em; }
.auth__field input {
  width: 100%; padding: .7rem .8rem; font-size: .95rem;
  border: var(--tb-border); border-radius: 0; background: var(--tb-surface);
  font-family: var(--tb-mono);
}
.auth__field input:focus { outline: none; box-shadow: var(--tb-shadow-sm); }

/* Checkbox toggle rows: opt out of the block/full-width field styling. */
.auth__field label.toggle-row { display: flex; align-items: center; gap: .65rem; margin-bottom: 0; cursor: pointer; }
.auth__field .toggle-row input[type="checkbox"] {
  width: 22px; height: 22px; flex: 0 0 auto; margin: 0; padding: 0;
  accent-color: var(--tb-orange); border: var(--tb-border); box-shadow: none;
}
.auth .tb-btn--primary { width: 100%; text-align: center; }
.auth__alt { text-align: center; margin-top: 1.25rem; font-size: .8rem; font-family: var(--tb-mono); text-transform: uppercase; letter-spacing: .04em; }
.auth__alt a { color: var(--tb-orange-deep); font-weight: 700; }

/* --- Admin forms & data blocks --- */
.json-block {
  font-family: var(--tb-mono);
  font-size: .82rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--tb-ink);
}
.form-card { max-width: 560px; }
.form-card select, .json-input {
  width: 100%; padding: .6rem .7rem; font-size: .95rem;
  border: var(--tb-border); border-radius: 0; background: var(--tb-surface);
  font-family: var(--tb-mono);
}
.json-input { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.form-card select:focus, .json-input:focus { outline: none; box-shadow: var(--tb-shadow-sm); }

.tb-pagination { display: flex; gap: .8rem; align-items: center; margin-top: 1.25rem; }
.tb-pagination__info { font-family: var(--tb-mono); font-weight: 700; font-size: .85rem; }

.inline-form { display: flex; gap: .6rem; align-items: stretch; margin: 1rem 0 1.5rem; flex-wrap: wrap; }
/* Flatten wrapper forms (form_with, button_to) so their controls align as flex items. */
.inline-form form { display: contents; }
.inline-form__input {
  padding: .55rem .7rem; font-size: .9rem; font-family: var(--tb-mono);
  border: var(--tb-border); border-radius: 0; background: var(--tb-surface);
  text-transform: uppercase;
}
select.inline-form__input { font-weight: 700; box-shadow: var(--tb-shadow-sm); cursor: pointer; }
.inline-form__label { align-self: center; color: var(--tb-muted); font-family: var(--tb-mono); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
/* Stacked filter rows (e.g. the report page) read as one control block. */
.inline-form + .inline-form { margin-top: -0.75rem; }
.inline-form__input:focus { outline: none; box-shadow: var(--tb-shadow-sm); }

/* Keep button_to forms inline in table cells. */
.tb-table form { display: inline; margin: 0; }
.tb-table .tb-btn { padding: .35rem .7rem; font-size: .72rem; box-shadow: 2px 2px 0 var(--tb-ink); }
.tb-table .tb-btn:hover { box-shadow: 3px 3px 0 var(--tb-ink); }
.tb-table .tb-btn:active { box-shadow: 0 0 0 var(--tb-ink); }

/* --- Mobile --- */
/* On phones the header keeps only the logo; navigation moves to a fixed
   bottom tab bar (app-style) with a "More" sheet for secondary pages. */
.tb-bottomnav { display: none; }

@media (max-width: 700px) {
  .tb-nav { display: none; }
  .tb-header__inner { justify-content: center; padding: .55rem .9rem; }
  .tb-logo__img--desktop { display: none; }
  .tb-logo__img--mobile { display: block; height: 56px; }

  /* Card list: rows become stacked cards so wide tables need no sideways scroll. */
  .table-wrap:has(.tb-table--cards) { background: none; border: none; box-shadow: none; overflow: visible; }
  .tb-table--cards, .tb-table--cards tbody { display: block; }
  .tb-table--cards thead { display: none; }
  .tb-table--cards tr {
    display: flex;
    flex-direction: column;
    background: var(--tb-surface);
    border: var(--tb-border);
    box-shadow: var(--tb-shadow-sm);
    padding: .3rem .85rem .65rem;
    margin-bottom: 1rem;
  }
  .tb-table--cards tr:last-child { margin-bottom: 0; }
  .tb-table--cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .45rem 0;
    border-bottom: 1px dashed #d8d4c6;
    white-space: normal;
    text-align: right;
  }
  .tb-table--cards tr:last-child td { border-bottom: 1px dashed #d8d4c6; }
  .tb-table--cards tr td:last-child { border-bottom: none; }
  .tb-table--cards td[data-label]::before {
    content: attr(data-label);
    color: var(--tb-muted);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
  .tb-table--cards tr td.cardlist__title {
    order: -1;
    font-size: 1.2rem;
    text-align: left;
    justify-content: flex-start;
    border-bottom: 2px solid var(--tb-ink);
    padding: .55rem 0 .45rem;
  }
  .tb-table--cards td.row-actions { justify-content: flex-end; gap: .6rem; padding-top: .65rem; }

  .tb-main { padding: 1.1rem .9rem calc(4.6rem + env(safe-area-inset-bottom)); }
  .dash__head h1 { font-size: 1.6rem; }
  .card__value { font-size: 1.15rem; }
  .card { padding: .85rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
  .chart-wrap { height: 320px; }
  .chart-wrap--short { height: 240px; }

  /* 16px floor stops iOS Safari from auto-zooming focused inputs. */
  .auth__field input, .form-card select, .json-input, .inline-form__input, select { font-size: 16px; }

  .tb-bottomnav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: var(--tb-surface);
    border-top: 5px solid var(--tb-ink);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tb-bottomnav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .55rem 0 .5rem;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tb-ink);
    text-decoration: none;
    font-family: var(--tb-mono);
    font-size: .58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .tb-bottomnav__item svg { width: 21px; height: 21px; }
  .tb-bottomnav__item.is-active { background: var(--tb-orange); }

  .tb-sheet {
    position: fixed;
    left: .6rem; right: .6rem;
    bottom: calc(4.4rem + env(safe-area-inset-bottom));
    z-index: 60;
    background: var(--tb-surface);
    border: var(--tb-border);
    box-shadow: var(--tb-shadow);
    padding: .4rem;
  }
  .tb-sheet__link {
    display: block;
    padding: .8rem .9rem;
    color: var(--tb-ink);
    text-decoration: none;
    font-weight: 800;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--tb-ink);
  }
  .tb-sheet__link:active { background: var(--tb-gold); }
  .tb-sheet form { margin: 0; }
  .tb-sheet__signout {
    display: block;
    width: 100%;
    text-align: left;
    padding: .8rem .9rem;
    background: var(--tb-ink);
    color: var(--tb-surface);
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-family: inherit;
  }
}
