:root {
  --ink: #10141c;
  --muted: #505a66;
  --line: #e9edf2;
  --orange: #ff7a2f;
  --paper: #ffffff;
  --editable : #c2deff;

  --orange-hover: #e96620;
  --orange-shadow: #db6927;
  --orange-soft: #fff2ea;

  --danger: #b42318;
  --danger-soft: #fff1f0;
}


/* Base */

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.45 "Segoe UI", Tahoma, Arial, sans-serif;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 18px 42px;
}


/* Navigation */
nav {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
nav b {
  margin-right: auto;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}
nav b i {
  color: var(--orange);
  font-style: normal;
}
nav a {
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
}
/* Push Docs and everything after it to the right */
nav a:nth-of-type(2) {
  margin-left: auto;
}

/* Common elements */

.button,
button,
input[type="submit"] {
    appearance: none;

    min-height: 40px;
    padding: 0.65rem 1rem;

    border: 1px solid transparent;
    border-radius: 9px;

    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        transform 120ms ease,
        box-shadow 120ms ease;
}

.button-primary {
    color: var(--paper);
    background-color: var(--orange);
    box-shadow: 0 3px 0 var(--orange-shadow);
}

.button-primary:hover {
    background-color: var(--orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--orange-shadow);
}

.button-primary:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--orange-shadow);
}

.button-secondary {
    color: var(--ink);
    background-color: var(--orange-soft);
    border-color: var(--orange);
}

.button-secondary:hover {
    background-color: #ffe5d6;
}

.button-danger {
    color: var(--danger);
    background-color: var(--danger-soft);
    border-color: #efb4af;
}

.button-danger:hover {
    color: var(--paper);
    background-color: var(--danger);
    border-color: var(--danger);
}

.button-neutral {
    color: var(--ink);
    background-color: var(--paper);
    border-color: #cbd2da;
}

.button-neutral:hover {
    background-color: var(--line);
}

.button:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible {
    outline: 3px solid rgb(255 122 47 / 30%);
    outline-offset: 2px;
}

.button:disabled,
button:disabled,
input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

section {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  padding-bottom: 8px;
  border-bottom: 0;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

h1 i {
  color: var(--orange);
  font-style: normal;
}

h2 {
  margin: 1rem 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h3 {
  margin: 2rem 0 1rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.1;
}

p {
  margin: 1rem 0 1rem;
  line-height: 1.4;
}

em {
    font-style: normal;
    font-weight: 700;
    font-size: 0.95em;
}

a {
  color: var(--ink);
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
  background-color: var(--orange-soft);
  text-decoration-thickness: 3px;
}

a:focus-visible {
    outline: 3px solid rgb(255 122 47 / 30%);
    outline-offset: 2px;
    border-radius: 2px;
}


pre, code {
  margin: 4px;
  padding: 4px;
  overflow-x: auto;
  background: #fffaf6;
  border: 1px solid #ffd8be;
  border-radius: 5px;
  font: 400 0.875rem/1.6 Consolas, "Courier New", monospace;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background-color: var(--editable);
}

textarea {
  width:100%;
}

/* Landing-page components */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: center;
}

.hero p {
  max-width: 550px;
  margin: 0 0 16px;
  color: var(--muted);
}

.hero div {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.steps,
.cards,
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps p,
.features p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 1rem;
}

.steps b {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
}

.cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px;
  color: #fff;
  background: var(--orange);
  border-radius: 12px;
}

.cta a {
  margin-left: auto;
  padding: 10px 14px;
  color: var(--orange);
  background: #fff;
  border-radius: 9px;
  font-weight: 700;
  text-decoration: none;
}

/* Special bits */
.calculation-packs {
    border-collapse: collapse;
    font-family: monospace;
}

.calculation-packs th,
.calculation-packs td {
    padding: 0.35rem 0.5rem;
    text-align: right;
}

.calculation-packs th:first-child,
.calculation-packs td:first-child {
    text-align: right;
}

.calculation-packs th:nth-child(2),
.calculation-packs td:nth-child(2) {
    padding-left: 5rem;
}
/* Footer */

footer {
  display: flex;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  gap: 14px;
  color: var(--muted);
  font-size: 1.0rem;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer span:last-child {
    margin-left: auto;
}

/*universal time displayer */
.timestamp-wrap {
    display: inline-block;
    position: relative;
}

.timestamp {
    color: inherit;
    cursor: help;
    text-decoration-line: underline;
    text-decoration-color: var(--line);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.timestamp:hover,
.timestamp:focus {
    text-decoration-color: var(--orange);
    outline: none;
}

.timestamp-popup {
    display: none;
    position: absolute;
    z-index: 10;
    top: calc(100% + 8px);
    left: 0;
    min-width: 330px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid #d2d7df;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgb(16 20 28 / 20%);
    font-size: 0.9rem;
    line-height: 1.45;
}

.timestamp-wrap:hover .timestamp-popup,
.timestamp-wrap:focus-within .timestamp-popup,
.timestamp-wrap.timestamp-open .timestamp-popup {
    display: block;
}

.timestamp-popup-title {
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.timestamp-popup-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 3px 0;
}

.timestamp-popup-label {
    font-weight: 700;
}



/* form submit spinner */
.submit-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
    color: var(--orange);
    font-weight: 600;
}

.submit-spinner-icon {
    width: 1rem;
    height: 1rem;
    border: 0.18rem solid rgba(255, 122, 47, 0.25);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: submit-spinner-rotate 0.7s linear infinite;
}

@keyframes submit-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

/* try to turn off autofill hijacking of background color */
:is(input, textarea):autofill {
    color: var(--ink);
    box-shadow:
        0 0 0 1000px var(--editable) inset;
    caret-color: var(--ink);
}

:is(input, textarea):-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow:
        0 0 0 1000px var(--editable) inset;
    box-shadow:
        0 0 0 1000px var(--editable) inset;
    caret-color: var(--ink);
}

:is(input, textarea):-moz-autofill {
    color: var(--ink);
    box-shadow:
        0 0 0 1000px var(--editable) inset;
    caret-color: var(--ink);
}


/* forms and form status messages */
.form-status {
    color: var(--orange);
}

.password-requirements {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Responsive layout */

@media (max-width: 980px) {
  .hero,
  .steps,
  .cards,
  .features {
    grid-template-columns: 1fr;
  }

  nav {
    flex-wrap: wrap;
  }

  nav b {
    width: 100%;
  }

  .cta a {
    margin-left: 0;
  }
}

/* Landing page headings */
.landing-page h1 {
  font-size: clamp(3rem, 9vw, 5.375rem);
  margin: 0 0 16px;
}
.landing-page h2 {
  font-size: clamp(2rem, 5vw, 2.875rem);
  margin-top: 0px;
}
.landing-page h3 {font-size: clamp(1.5rem, 3vw, 2rem);}