/* Hourhaven: the base every page shares (fonts, colours, header, buttons, footer, text pages and the
   fee tables). Mobile first: laid out at 390 px, holds at 320 px (16 px gutters, no sideways scroll),
   and caps at a 1080 px column on wide screens. The home page adds css/home.css on top. */

/* Fonts are self-hosted (latin subsets from Google Fonts, SIL Open Font License),
   so no visitor IP address goes to a third party. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/libre-caslon-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Libre Caslon Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/libre-caslon-text-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/libre-caslon-text-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F5F6F2;
  --white: #FFFFFF;
  --ink: #14261D;
  --ink-2: #3D4D44;
  --ink-3: #4F5F56;
  --green: #1E5B44;
  --green-dark: #184C39;
  --red: #A8322A;
  --red-tint: #FBEAE8;
  --rule: #D5DCD4;
  --rule-soft: #E3E8E1;
  --control: #B9C6BD;
  --field: #6E8A7B; /* form field borders: 3.8:1 on white, 3.5:1 on paper */
  --tint: #EEF3EE;
  --track: #E7ECE5;
  --dash: #9DB3A6;
  --cert-paper: #FBFCF8;
  /* One critically damped spring (damping 1) for every move. Such springs all share this shape,
     so the duration alone sets the response: 0.45 s, 0.59 s and 0.67 s for 0.3, 0.4 and 0.45. */
  --spring: linear(0, 0.08, 0.24, 0.409, 0.557, 0.677, 0.769, 0.837, 0.887, 0.922, 0.947, 0.964, 0.976, 0.984, 0.989, 0.993, 0.995, 0.997, 0.998, 0.999, 1);
  color-scheme: light;
}
@supports not (animation-timing-function: linear(0, 1)) {
  :root { --spring: cubic-bezier(0.2, 0.8, 0.2, 1); }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: var(--green); }
a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
a:not(.button):focus-visible,
summary:focus-visible { border-radius: 6px; }
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { display: block; flex: none; width: 30px; height: 30px; }
.brand-name {
  font-size: 19px;
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.01em;
}
.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

/* Shared pieces */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: var(--white);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.button:hover { background: var(--green-dark); color: var(--white); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 6px;
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
}

.fine {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.5;
}

/* Fee tables (the home page calculator and the Harvest pricing explainer) */
.table-scroll {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--white);
}
.fees {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.fees caption {
  padding: 12px 14px 6px;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}
.fees th,
.fees td {
  padding: 8px 14px;
  border-top: 1px solid var(--rule-soft);
  text-align: left;
  white-space: nowrap;
}
.fees thead th { color: var(--ink-3); font-weight: 600; }
.fees tbody th { color: var(--ink); font-weight: 700; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--rule);
}
.footer-note {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}

/* Every language: a word too long for its line hyphenates or breaks instead of pushing the page sideways. */
body {
  overflow-wrap: anywhere;
}
:is(h1, h2, h3) {
  hyphens: auto;
}
.site-header {
  flex-wrap: wrap;
}

/* Shown on translated pages only: what stays in English there. */
html[lang='en'] .l10n-note {
  display: none;
}

/* The header's language menu: a globe and the current language, opening every language. details/summary, so it works
   without script; js/lang.js closes it on a click outside or Escape. */
.site-header-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* A phone: the list opens across the header's width, in two columns. */
@media (max-width: 759px) {
  .site-header {
    position: relative;
  }
  .site-header .lang-menu {
    position: static;
  }
  .site-header .lang-list {
    right: 0;
    left: 0;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }
}
.lang-menu {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}
.lang-btn:hover,
.lang-menu[open] .lang-btn {
  border-color: var(--green);
}
.lang-btn::-webkit-details-marker {
  display: none;
}
.lang-globe {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  min-width: 210px;
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 6px;
  border-radius: 16px;
}
.lang-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
  text-decoration: none;
}
.lang-list {
  border: 1px solid var(--rule);
  background: var(--white);
  box-shadow: 0 24px 60px rgba(20, 38, 29, 0.14);
}
.lang-list a {
  color: var(--ink-2);
}
.lang-list a:hover,
.lang-list a[aria-current] {
  background: var(--paper);
  color: var(--ink);
}
.lang-list a[aria-current] {
  font-weight: 700;
}

/* The language hint (js/lang.js): a slim bar above the header, in the visitor's own language. */
.lang-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink-2);
  font-size: 14px;
}
.lang-hint p {
  flex: 1;
  margin: 0;
}
.lang-hint a {
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 3px;
}
.lang-hint-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

/* Languages: this page in each language, named in its own language. */
.langs {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
}
.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}
.langs a[aria-current] {
  font-weight: 700;
}

/* Japanese, Korean and Chinese pages: the system's CJK faces after Archivo (which only carries Latin), no tightened
   tracking on CJK headings, and Korean breaks lines between words. */
:lang(ja) body {
  font-family: 'Archivo', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP', sans-serif;
}
:lang(ko) body {
  font-family: 'Archivo', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  word-break: keep-all;
}
:lang(zh) body {
  font-family: 'Archivo', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}
:is(:lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3) {
  letter-spacing: 0;
}

/* Footer: the free tools, above the site links */
.footer-tools {
  flex: 1 1 100%;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-soft);
}
.footer-heading {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.footer-tools ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}

/* Text pages (privacy, not found) */
.prose {
  max-width: 40em;
  padding: 28px 0 48px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.6;
}
.prose h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.prose h2 {
  margin: 32px 0 8px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  font-stretch: 108%;
  line-height: 1.25;
}
.prose p,
.prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose .updated {
  margin-bottom: 24px;
  color: var(--ink-3);
  font-size: 14px;
}
.prose .button { margin-top: 8px; }
