/* ==========================================================================
   Range Labs Test Request Portal — the marketing site's Carbon look, adapted
   for a data-dense product UI.
   --------------------------------------------------------------------------
   Tokens are copied from the marketing site (../app/assets/stylesheets) so the
   two read as one brand: white canvas, charcoal type, one blue, flat-square
   corners, IBM Plex Sans with weight 300 for headings, hairlines not shadows,
   and an inverted footer.

   Product-UI deviations from the marketing stylesheet:
   1. Controls are 40px (Carbon "field/md"), not 48px, so buttons inside table
      rows and inline forms don't blow up row height.
   2. Body copy, list items and table cells stay full-ink. Marketing mutes
      paragraphs; on data screens muted text reads as disabled.
   3. Styles target bare elements (table, input, button, h1…) because views
      are plain Rails markup; class hooks are the portal's own
      (.field, .hint, .badge-ok, .summary, .steps…).
   ========================================================================== */

:root {
  --primary:    #0f62fe;
  --on-primary: #ffffff;
  --blue-hover: #0050e6;
  --blue-60:    #0043ce;
  --blue-80:    #002d9c;
  --blue-10:    #edf5ff;

  --ink:        #161616;
  --ink-muted:  #525252;
  --ink-subtle: #8c8c8c;

  --canvas:          #ffffff;
  --surface-1:       #f4f4f4;
  --surface-2:       #e0e0e0;
  --hairline:        #e0e0e0;
  --field-rule:      #8c8c8c;

  --inverse-canvas:    #161616;
  --inverse-surface-1: #262626;
  --inverse-ink:       #ffffff;
  --inverse-ink-muted: #c6c6c6;

  --success: #24a148;
  --success-bg: #defbe6;
  --success-ink: #0e6027;
  --warning: #f1c21b;
  --warning-bg: #fcf4d6;
  --warning-ink: #684e00;
  --error:   #da1e28;
  --error-bg: #fff1f1;
  --error-ink: #a2191f;
  --info:    #0f62fe;

  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --display-md: 42px;
  --headline:   32px;
  --card-title: 24px;
  --subhead:    20px;
  --body-lg:    18px;
  --body-md:    16px;
  --body-sm:    14px;
  --caption-sm: 12px;
  --track-body: 0.16px;
  --track-caption: 0.32px;

  --space-xxs: 4px;
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-xxl: 48px;

  --container: 1312px;
  --control: 40px;
  --duration: 110ms;
  --ease: cubic-bezier(0.2, 0, 0.38, 0.9);
  --z-header: 100;
  --z-dropdown: 200;
  --z-skip: 300;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body-sm);
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: var(--track-body);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--ink);
  margin: var(--space-xl) 0 var(--space-md);
  letter-spacing: 0;
  text-wrap: balance;
}
h1 { margin-top: 0; font-size: var(--headline); font-weight: 300; line-height: 1.25; }
h2 { font-size: var(--card-title); font-weight: 400; line-height: 1.33; }
h3 { font-size: var(--subhead); font-weight: 400; line-height: 1.4; }
h4 { font-size: var(--body-md); font-weight: 600; line-height: 1.5; }
h1 .badge, h2 .badge { vertical-align: middle; }

p { margin: 0 0 var(--space-md); }
ul, ol { margin: 0 0 var(--space-md); padding-left: 1.25rem; }
li + li { margin-top: var(--space-xxs); }
strong, b { font-weight: 600; }
small { font-size: var(--caption-sm); letter-spacing: var(--track-caption); }
hr { border: 0; border-top: 1px solid var(--hairline); margin: var(--space-xl) 0; }
code, kbd, samp { font-family: "IBM Plex Mono", Menlo, monospace; font-size: 0.93em; background: var(--surface-1); padding: 0 4px; }
pre { background: var(--surface-1); padding: var(--space-md); overflow-x: auto; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--blue-60); text-decoration: underline; }
p a, li a, td a, dd a, .flash a, .errors a { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.skip-link {
  position: absolute; left: 0; top: 0; z-index: var(--z-skip);
  padding: var(--space-sm) var(--space-md);
  background: var(--primary); color: var(--on-primary);
  transform: translateY(-200%);
  transition: transform var(--duration) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); color: var(--on-primary); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
@media (min-width: 42rem) { .container { padding-inline: var(--space-xl); } }

/* --------------------------------------------------------------------------
   Chrome: utility bar, header, app nav, footer
   -------------------------------------------------------------------------- */

.utility {
  background: var(--surface-1);
  color: var(--ink-muted);
  font-size: var(--caption-sm);
  letter-spacing: var(--track-caption);
}
.utility__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-md); min-height: 32px;
}
.utility p { margin: 0; }
.utility a { color: var(--ink-muted); }
.utility a:hover { color: var(--primary); }
@media (max-width: 41.99rem) { .utility { display: none; } }

.header {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.header__inner {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: var(--space-md); min-height: 56px;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-md);
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__logo { display: block; height: 34px; width: auto; }
.brand__product {
  padding-left: var(--space-md);
  border-left: 1px solid var(--hairline);
  font-size: var(--body-md);
  font-weight: 400;
  white-space: nowrap;
}
@media (max-width: 30rem) {
  .brand__logo { height: 28px; }
  .brand__product { display: none; }
}

/* Account menu: a <details> disclosure, so it works without JavaScript. */
.account { position: relative; display: flex; }
.account > summary {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  padding-inline: var(--space-md);
  list-style: none;
  cursor: pointer;
  font-size: var(--body-sm);
  color: var(--ink);
}
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover, .account[open] > summary { background: var(--surface-1); }
.account > summary::after {
  content: ""; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform var(--duration) var(--ease);
}
.account[open] > summary::after { transform: rotate(180deg); }
.account__avatar {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  background: var(--ink); color: var(--inverse-ink);
  font-size: var(--caption-sm); font-weight: 600; letter-spacing: 0;
}
.account__name { white-space: nowrap; }
@media (max-width: 42rem) { .account__name { display: none; } }
.account__panel {
  position: absolute; right: 0; top: 100%; z-index: var(--z-dropdown);
  min-width: 17rem;
  background: var(--canvas);
  border: 1px solid var(--hairline);
}
.account__who { padding: var(--space-md); border-bottom: 1px solid var(--hairline); }
.account__who strong { display: block; }
.account__who span { display: block; color: var(--ink-muted); font-size: var(--caption-sm); letter-spacing: var(--track-caption); }
.account__panel a,
.account__panel button {
  display: flex; align-items: center; justify-content: flex-start; width: 100%;
  min-height: var(--control);
  padding: var(--space-xs) var(--space-md);
  background: none; border: 0; border-radius: 0;
  color: var(--ink); font: inherit; letter-spacing: var(--track-body);
  text-align: left; text-decoration: none; cursor: pointer;
}
.account__panel a:hover, .account__panel button:hover { background: var(--surface-1); color: var(--ink); text-decoration: none; }
.account__panel form { margin: 0; border-top: 1px solid var(--hairline); }

/* App nav: one row of tabs; scrolls sideways on narrow screens instead of
   hiding behind a menu, so every section stays one click away. */
.appnav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: var(--z-header);
}
.appnav ul {
  display: flex; flex-wrap: wrap; margin: 0 calc(var(--space-md) * -1); padding: 0; list-style: none;
}
@media (max-width: 66rem) {
  .appnav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .appnav ul::-webkit-scrollbar { display: none; }
}
.appnav li + li { margin-top: 0; }
.appnav a {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding-inline: var(--space-md);
  border-bottom: 2px solid transparent;
  color: var(--ink-muted);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.appnav a:hover { background: var(--surface-1); color: var(--ink); text-decoration: none; }
.appnav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--primary); }
.appnav__sep { width: 1px; margin: var(--space-sm) var(--space-xs); background: var(--hairline); }

.page { flex: 1; padding-block: var(--space-xl) var(--space-xxl); }

.footer {
  background: var(--inverse-canvas);
  color: var(--inverse-ink-muted);
  padding-block: var(--space-xl);
  font-size: var(--caption-sm);
  letter-spacing: var(--track-caption);
}
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md) var(--space-xl); }
.footer__logo { display: block; height: 32px; width: auto; }
.footer p { margin: 0; color: var(--inverse-ink-muted); }
.footer ul { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.footer li + li { margin-top: 0; }
.footer a { color: var(--inverse-ink-muted); text-decoration: none; }
.footer a:hover { color: var(--inverse-ink); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Notifications
   -------------------------------------------------------------------------- */

.flash, .errors {
  display: block;
  margin: 0 0 var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--blue-10);
  box-shadow: inset 3px 0 0 var(--info);
  border: 0; border-radius: 0;
  color: var(--ink);
}
.flash.notice { background: var(--success-bg); box-shadow: inset 3px 0 0 var(--success); }
.flash.alert, .errors { background: var(--error-bg); box-shadow: inset 3px 0 0 var(--error); color: var(--ink); }
.errors h2 { margin: 0 0 var(--space-xxs); font-size: var(--body-sm); font-weight: 600; }
.errors ul { margin: 0; }
.errors p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Buttons — square, Carbon primary blue; .button-danger, .link variants
   -------------------------------------------------------------------------- */

.button, button, input[type=submit], input[type=button], input[type=reset] {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--control);
  padding: 0 var(--space-md);
  background: var(--primary);
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--on-primary);
  font-family: var(--font-body);
  font-size: var(--body-sm);
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: var(--track-body);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.button:hover, button:hover, input[type=submit]:hover, input[type=button]:hover {
  background: var(--blue-hover); color: var(--on-primary); text-decoration: none;
}
.button:active, button:active, input[type=submit]:active { background: var(--blue-80); }
button:disabled, input[type=submit]:disabled, .button[aria-disabled="true"] {
  background: var(--surface-2); color: var(--ink-subtle); cursor: not-allowed;
}

.button-secondary { background: var(--ink); }
.button-secondary:hover { background: var(--inverse-surface-1); }
.button-danger, button.button-danger, input[type=submit].button-danger { background: var(--error); }
.button-danger:hover, button.button-danger:hover, input[type=submit].button-danger:hover { background: #b81921; }

button.link, .link, input[type=submit].link {
  min-height: 0; padding: 0;
  background: none; border: 0;
  color: var(--primary);
  text-decoration: underline; text-underline-offset: 2px;
}
button.link:hover, .link:hover, input[type=submit].link:hover { background: none; color: var(--blue-60); }

form.inline, .inline, form.button_to { display: inline; }
form.button_to { margin: 0; }

/* Rows of actions: a primary button followed by plain links. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin: var(--space-lg) 0; }
p:has(> .button) {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md);
}

/* --------------------------------------------------------------------------
   Forms — Carbon fields: gray fill, bottom rule, blue focus outline
   -------------------------------------------------------------------------- */

form { margin: 0 0 var(--space-md); }

.field { display: flex; flex-direction: column; gap: var(--space-xxs); margin: 0 0 var(--space-lg); max-width: 36rem; }
.field > p { margin: 0; }
.field label, .field > legend, label.field-label {
  font-size: var(--caption-sm);
  letter-spacing: var(--track-caption);
  color: var(--ink-muted);
}
fieldset { margin: 0 0 var(--space-lg); padding: 0; border: 0; min-width: 0; }
fieldset > legend { padding: 0; margin-bottom: var(--space-xs); }
fieldset.field { gap: 0; }
fieldset.field > legend { margin-bottom: var(--space-xs); font-size: var(--body-sm); letter-spacing: var(--track-body); color: var(--ink); }

input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=range]):not([type=color]),
select, textarea {
  min-height: var(--control);
  padding: 0 var(--space-md);
  background: var(--surface-1);
  border: 0;
  border-bottom: 1px solid var(--field-rule);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body-sm);
  line-height: 1.29;
  letter-spacing: var(--track-body);
  transition: background-color var(--duration) var(--ease);
}
textarea { padding-block: var(--space-sm); min-height: 6rem; resize: vertical; width: 100%; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]),
.field select, .field textarea { width: 100%; }
input:hover:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]), select:hover, textarea:hover { background: var(--surface-2); }
input:focus:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]), select:focus, textarea:focus {
  outline: 2px solid var(--primary); outline-offset: -2px; background: var(--surface-1);
}
input:disabled, select:disabled, textarea:disabled { color: var(--ink-subtle); cursor: not-allowed; border-bottom-color: transparent; }
input[readonly] { border-bottom-style: dashed; }
select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  background-size: 16px 16px;
}
select[multiple] { background-image: none; padding: var(--space-xs); min-height: 8rem; }
input[type=file] { font: inherit; font-size: var(--body-sm); }
input[type=file]::file-selector-button {
  margin-right: var(--space-sm); min-height: 32px; padding: 0 var(--space-md);
  background: var(--ink); color: var(--inverse-ink); border: 0; border-radius: 0; font: inherit; cursor: pointer;
}

input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; flex: none; }

.field-check { flex-direction: row; align-items: center; gap: var(--space-xs); }
.field-check label { font-size: var(--body-sm); letter-spacing: var(--track-body); color: var(--ink); }
.check {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  min-height: 32px; margin-right: var(--space-lg);
  font-size: var(--body-sm) !important; letter-spacing: var(--track-body) !important; color: var(--ink) !important;
  cursor: pointer;
}

.hint { color: var(--ink-muted); }
.field .hint, .field > small { font-size: var(--caption-sm); letter-spacing: var(--track-caption); }

.field_with_errors { display: contents; }
.field_with_errors input, .field_with_errors select, .field_with_errors textarea { border-bottom: 2px solid var(--error) !important; }
.field_with_errors label { color: var(--error-ink); }

.row { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); align-items: flex-end; }
.row .field { flex: 1 1 14rem; }

.inline-form { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-sm); align-items: center; margin: var(--space-sm) 0 var(--space-md); }
.inline-form label { font-size: var(--caption-sm); letter-spacing: var(--track-caption); color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   Tables — Carbon data table
   -------------------------------------------------------------------------- */

table {
  width: 100%;
  margin: var(--space-xs) 0 var(--space-lg);
  border-collapse: collapse;
  font-size: var(--body-sm);
  letter-spacing: var(--track-body);
}
th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
thead th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  vertical-align: bottom;
}
tbody th { font-weight: 600; background: var(--surface-1); }
tbody tr { background: var(--surface-1); transition: background-color var(--duration) var(--ease); }
tbody tr:hover { background: var(--surface-2); }
td input:not([type=checkbox]):not([type=radio]):not([type=submit]), td select { background: var(--canvas); }
td .button, td button, td input[type=submit] { min-height: 32px; padding: 0 var(--space-sm); }
td form { margin: 0; }
@media (max-width: 48rem) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --------------------------------------------------------------------------
   Tags, definition lists, tiles
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center;
  min-height: 24px;
  padding: 0 var(--space-xs);
  border-radius: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--caption-sm);
  font-weight: 400;
  letter-spacing: var(--track-caption);
  white-space: nowrap;
}
.badge-ok   { background: var(--success-bg); color: var(--success-ink); }
.badge-warn { background: var(--warning-bg); color: var(--warning-ink); }
.badge-bad  { background: var(--error-bg); color: var(--error-ink); }
.badge-info { background: var(--blue-10); color: var(--blue-60); }

dl.details, .summary {
  display: grid;
  grid-template-columns: minmax(9rem, 16rem) 1fr;
  margin: 0 0 var(--space-lg);
  border-top: 1px solid var(--hairline);
}
dl.details > dt, dl.details > dd, .summary > dt, .summary > dd {
  margin: 0;
  padding: var(--space-xs) var(--space-md) var(--space-xs) 0;
  border-bottom: 1px solid var(--hairline);
}
dl.details > dt, .summary > dt { color: var(--ink-muted); }
.summary dd p { margin: 0; }
@media (max-width: 36rem) {
  dl.details, .summary { grid-template-columns: 1fr; }
  dl.details > dt, .summary > dt { border-bottom: 0; padding-bottom: 0; }
}

.sample, section.nested {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--canvas);
  border: 1px solid var(--hairline);
}
.sample > :first-child, section.nested > :first-child { margin-top: 0; }
.sample > :last-child, section.nested > :last-child { margin-bottom: 0; }

main > section { margin-top: var(--space-xl); }
main > section > h2:first-child, main > section > h3:first-child { margin-top: 0; }

/* Dashboard tiles */
.tiles { display: grid; margin: 0 0 var(--space-xl); border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.tile {
  display: flex; flex-direction: column; gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none !important;
  transition: background-color var(--duration) var(--ease);
}
a.tile:hover { background: var(--surface-1); color: var(--ink); }
a.tile:hover .tile__label { color: var(--primary); }
.tile__value { font-size: var(--display-md); font-weight: 300; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile__label { color: var(--ink-muted); }
.tile--alert .tile__value { color: var(--error-ink); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); }
.page-head h1 { margin: 0; }
.page-head p { margin: var(--space-xxs) 0 0; color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   Request wizard steps — Carbon progress indicator
   -------------------------------------------------------------------------- */

.steps ol {
  display: flex; flex-wrap: wrap; gap: 0;
  margin: 0 0 var(--space-xl); padding: 0; list-style: none;
}
.steps li { flex: 1 1 8rem; margin: 0; }
.steps li a {
  display: block;
  padding: var(--space-xs) var(--space-md) var(--space-xs) 0;
  border-top: 2px solid var(--hairline);
  color: var(--ink-muted);
  text-decoration: none;
}
.steps li a:hover { color: var(--ink); border-top-color: var(--ink-muted); text-decoration: none; }
.steps li.current a { border-top-color: var(--primary); color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Timeline — square markers on a hairline rail
   -------------------------------------------------------------------------- */

.timeline { margin: 0 0 var(--space-lg); padding: 0; list-style: none; }
.timeline li {
  position: relative;
  margin: 0;
  padding: 0 0 var(--space-md) var(--space-lg);
  border-left: 1px solid var(--hairline);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -4px; top: 6px;
  width: 7px; height: 7px; background: var(--primary);
}

/* --------------------------------------------------------------------------
   Signatures
   -------------------------------------------------------------------------- */

.signature-pad canvas { border: 1px dashed var(--field-rule); touch-action: none; background: var(--canvas); max-width: 100%; }
.signature-image { border: 1px solid var(--hairline); max-height: 90px; background: var(--canvas); }
.typed-signature { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.6em; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Signed-out pages (sign in, password reset, invitation, unlock)
   -------------------------------------------------------------------------- */

.auth .page > .container { display: flex; flex-direction: column; align-items: center; }
.auth .page .flash { width: 100%; max-width: 30rem; }
.auth-card {
  width: 100%; max-width: 30rem;
  padding: var(--space-xl) var(--space-lg);
  background: var(--canvas);
  border: 1px solid var(--hairline);
}
@media (min-width: 42rem) { .auth-card { padding: var(--space-xl); } }
.auth-card h1, .auth-card h2:first-child { margin: 0 0 var(--space-lg); font-size: var(--headline); font-weight: 300; }
.auth-card .field { max-width: none; }
.auth-card input[type=submit] { width: 100%; min-height: 48px; text-align: left; }
.auth-card .auth-links { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--hairline); }
.auth-card .auth-links p { margin: 0 0 var(--space-xs); }

.auth-split { display: grid; width: 100%; max-width: 60rem; border: 1px solid var(--hairline); }
.auth-split .auth-card { max-width: none; border: 0; }
.auth-aside { padding: var(--space-xl); background: var(--surface-1); }
.auth-aside h2 { margin-top: 0; font-weight: 300; }
.auth-aside ul { padding: 0; list-style: none; }
.auth-aside li { position: relative; padding-left: var(--space-lg); }
.auth-aside li + li { margin-top: var(--space-sm); }
.auth-aside li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; background: var(--primary); }
@media (min-width: 48rem) { .auth-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   Motion and print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .utility, .header, .appnav, .footer, .button, button, input[type=submit] { display: none !important; }
  body { font-size: 10pt; }
  tbody tr { background: none; }
}
