/*
 * Tressle base styles (2026 revamp). Loaded right after tokens.css and the legacy tressle-sources.css,
 * so the element defaults below win over that file's global body / h1 rules.
 * Only design tokens from tokens.css are used here.
 */
@font-face { font-family: Hind; font-style: normal; font-weight: 300; font-display: fallback; src: url('/assets/fonts/Hind/Hind-Light.ttf') format('truetype'); }
@font-face { font-family: Hind; font-style: normal; font-weight: 400; font-display: fallback; src: url('/assets/fonts/Hind/Hind-Regular.ttf') format('truetype'); }
@font-face { font-family: Hind; font-style: normal; font-weight: 500; font-display: fallback; src: url('/assets/fonts/Hind/Hind-Medium.ttf') format('truetype'); }
@font-face { font-family: Hind; font-style: normal; font-weight: 600; font-display: fallback; src: url('/assets/fonts/Hind/Hind-SemiBold.ttf') format('truetype'); }
@font-face { font-family: Hind; font-style: normal; font-weight: 700; font-display: fallback; src: url('/assets/fonts/Hind/Hind-Bold.ttf') format('truetype'); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; width: 100%; }

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Type scale: display font for headings, sizes that work inside app pages (landing sets its own). */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--text-2xl); font-weight: 800; }
h2 { font-size: var(--text-xl); font-weight: 700; }
h3 { font-size: var(--text-lg); font-weight: 700; }
h4 { font-size: var(--text-md); font-weight: 700; }

/* Links: zero-specificity defaults, so any component class overrides them. */
:where(a) { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color var(--t-med) var(--ease); }
:where(a):hover { color: var(--green-800); }

::selection { background: var(--green-200); color: var(--text); }

/* Legacy "edit / manage" block (WPCode snippet 246) */
.edit-manage-block-container { width: 100%; margin: 0 !important; padding: 0 !important; display: flex; justify-content: center; }
.edit-manage-block {
  display: block; width: 100%; padding: var(--s-4) 0; background-color: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: var(--text-sm); color: var(--text-2); text-align: center; cursor: pointer;
  text-decoration: none; transition: background-color var(--t-med) var(--ease); margin: 0 !important;
}
.edit-manage-block:hover { background-color: var(--surface-3); }

/* Standard page wrapper */
main.site-main { display: block; margin: 0; padding: var(--s-10) 0 var(--s-16); animation: t-fade-up var(--t-slow) var(--ease) both; }
main.site-main.flush { padding-top: 0; }
@media (max-width: 600px) { main.site-main { padding: var(--s-6) 0 var(--s-12); } }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto; clip-path: none; height: auto; width: auto; left: var(--s-2); top: var(--s-2); z-index: 100000;
  background: var(--surface); color: var(--green-800); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); box-shadow: var(--shadow-2);
}
[hidden] { display: none !important; }

/* Keyboard focus ring (mouse clicks don't trigger :focus-visible). */
a:not(.nav-button):focus-visible, button:focus-visible, summary:focus-visible, [role='button']:focus-visible,
[tabindex]:not([tabindex='-1']):focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.memory-card:focus-visible { outline: 3px solid var(--tool-teach); outline-offset: 2px; }
.mychp-del-checkbox:focus-visible { outline: 2px solid var(--green-500) !important; outline-offset: 2px; }

/* The legacy global `input, select { margin-bottom: 10px }` must not leak into token fields. */
input.field, select.field, textarea.field, input.input, select.input { margin-bottom: 0; }
