/* ============================================================
   UAorganic design tokens (Claude Design, concept A «Довідник», 28.11.2026)
   Shared layer for catalog hubs, crop cards and the seeding calculator.
   Only --uao-* variables and new .uao-* classes: no existing selector is
   touched, so pages that do not use these classes look exactly as before.
   Loaded on demand: wp_enqueue_style( 'uao-tokens' ) (registered in inc/assets.php).
   Rules: white background, neutral surface, no light-green / salad fills;
   difficulty badges are outlined.
   ============================================================ */

@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/golos-text-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/golos-text-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/golos-text-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/golos-text-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 {
    /* brand */
    --uao-green-900: #14532D;   /* header, H1, primary button, active chip */
    --uao-green-700: #15803D;   /* links, "easy" badge border */
    --uao-green-600: #16A34A;   /* accent, focus ring */
    --uao-amber-600: #CA8A04;   /* "medium" badge border */
    --uao-amber-800: #854D0E;   /* "medium" text, warnings */
    --uao-pink-700:  #BE185D;   /* "hard" badge border, common mistakes */
    --uao-pink-800:  #9D174D;   /* "hard" text */
    --uao-on-dark:   #D1FAE5;   /* secondary text on the dark header/footer */

    /* neutrals */
    --uao-bg:        #FFFFFF;
    --uao-surface:   #F4F5F6;   /* neutral fill: table head, tags, result panel */
    --uao-text:      #10231A;
    --uao-text-2:    #4A5D52;
    --uao-line:      #DFE3E6;   /* card and panel borders */
    --uao-line-soft: #ECEEF0;   /* row separators */
    --uao-line-chip: #C8CED3;   /* chips, inputs, secondary buttons */
    --uao-ad-line:   #BCC3C9;
    --uao-ad-fill:   #F6F7F8;

    /* type: Golos Text, scale in px */
    --uao-font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --uao-fs-11: 11px;  --uao-fs-12: 12px;  --uao-fs-13: 13px;  --uao-fs-14: 14px;
    --uao-fs-15: 15px;  --uao-fs-16: 16px;  --uao-fs-20: 20px;  --uao-fs-24: 24px;
    --uao-fs-30: 30px;  --uao-fs-36: 36px;

    /* spacing: 4px grid */
    --uao-sp-1: 4px;  --uao-sp-2: 8px;  --uao-sp-3: 12px; --uao-sp-4: 16px;
    --uao-sp-5: 20px; --uao-sp-6: 24px; --uao-sp-8: 32px; --uao-sp-10: 40px; --uao-sp-12: 48px;

    /* radius, shadow */
    --uao-r-sm: 4px; --uao-r: 6px; --uao-r-md: 8px; --uao-r-lg: 10px; --uao-r-pill: 999px;
    --uao-shadow-bar: 0 4px 14px rgba(16, 35, 26, 0.08);
}

/* ---------- base for a page built on tokens (opt-in wrapper) ---------- */
.uao-ds {
    font-family: var(--uao-font);
    font-size: var(--uao-fs-14);
    line-height: 1.45;
    color: var(--uao-text);
    background: var(--uao-bg);
}
.uao-ds a { color: var(--uao-green-700); }
.uao-ds a:hover { color: var(--uao-green-900); }
.uao-ds :focus-visible { outline: 2px solid var(--uao-green-600); outline-offset: 2px; }
.uao-ds .uao-h1 { margin: 0; font-size: var(--uao-fs-30); line-height: 1.2; font-weight: 700; color: var(--uao-green-900); text-wrap: balance; }
.uao-ds .uao-h2 { margin: 0; font-size: var(--uao-fs-24); line-height: 1.25; font-weight: 700; color: var(--uao-green-900); }
.uao-ds .uao-muted { color: var(--uao-text-2); }
.uao-ds .uao-label { font-size: var(--uao-fs-11); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--uao-text-2); }
@media (min-width: 1024px) { .uao-ds .uao-h1 { font-size: var(--uao-fs-36); } }

/* ---------- buttons ---------- */
.uao-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--uao-sp-2);
    height: 40px; padding: 0 var(--uao-sp-4); border-radius: var(--uao-r-md);
    border: 1px solid var(--uao-green-900); background: var(--uao-green-900); color: #FFFFFF;
    font: 600 var(--uao-fs-14)/1 var(--uao-font); text-decoration: none; cursor: pointer;
}
.uao-btn:hover { background: #0F3F22; color: #FFFFFF; }
.uao-btn--secondary { background: var(--uao-bg); color: var(--uao-text); border-color: var(--uao-line-chip); }
.uao-btn--secondary:hover { background: var(--uao-surface); color: var(--uao-text); }
.uao-btn--outline { background: var(--uao-bg); color: var(--uao-green-900); }
.uao-btn--outline:hover { background: var(--uao-surface); color: var(--uao-green-900); }
.uao-btn--quick { height: 44px; border-color: var(--uao-line-chip); background: var(--uao-bg); color: var(--uao-text); }
.uao-btn--quick:hover { border-color: var(--uao-green-900); background: var(--uao-bg); color: var(--uao-text); }
.uao-btn--quick .uao-count { color: var(--uao-text-2); font-weight: 500; }

/* ---------- chips (filters) ---------- */
.uao-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 10px; border-radius: var(--uao-r-pill);
    border: 1px solid var(--uao-line-chip); background: var(--uao-bg); color: var(--uao-text);
    font: 500 var(--uao-fs-13)/1 var(--uao-font); cursor: pointer; white-space: nowrap;
}
.uao-chip .uao-count { opacity: 0.75; font-variant-numeric: tabular-nums; }
.uao-chip:hover { border-color: var(--uao-green-900); }
.uao-chip.is-active, .uao-chip[aria-pressed="true"] { background: var(--uao-green-900); border-color: var(--uao-green-900); color: #FFFFFF; }
.uao-chip:disabled, .uao-chip.is-empty { opacity: 0.45; cursor: default; }
.uao-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(16, 35, 26, 0.18); flex: none; }
.uao-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(16, 35, 26, 0.18); flex: none; display: inline-block; }

/* ---------- tags (taste, use): neutral, not clickable ---------- */
.uao-tag {
    display: inline-block; height: 20px; padding: 0 6px; border-radius: var(--uao-r-sm);
    background: var(--uao-surface); color: var(--uao-text); font: 400 var(--uao-fs-11)/20px var(--uao-font);
}

/* ---------- difficulty badge: outlined, color + bars ---------- */
.uao-badge {
    display: inline-flex; align-items: center; gap: 5px; box-sizing: border-box;
    height: 22px; padding: 0 8px; border-radius: var(--uao-r-sm);
    background: var(--uao-bg); border: 1px solid currentColor;
    font: 600 var(--uao-fs-12)/1 var(--uao-font); white-space: nowrap;
}
.uao-badge--easy   { color: var(--uao-green-900); border-color: var(--uao-green-700); }
.uao-badge--medium { color: var(--uao-amber-800); border-color: var(--uao-amber-600); }
.uao-badge--hard   { color: var(--uao-pink-800);  border-color: var(--uao-pink-700); }
.uao-badge__bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.uao-badge__bars i { display: block; width: 3px; background: var(--uao-line); }
.uao-badge__bars i:nth-child(1) { height: 4px; } .uao-badge__bars i:nth-child(2) { height: 7px; } .uao-badge__bars i:nth-child(3) { height: 10px; }
.uao-badge--easy   .uao-badge__bars i:nth-child(-n+1) { background: var(--uao-green-700); }
.uao-badge--medium .uao-badge__bars i:nth-child(-n+2) { background: var(--uao-amber-600); }
.uao-badge--hard   .uao-badge__bars i { background: var(--uao-pink-700); }

/* ---------- card (crop / flower) ---------- */
.uao-card {
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--uao-line); border-radius: var(--uao-r-md);
    background: var(--uao-bg); color: var(--uao-text); text-decoration: none;
}
.uao-card:hover { border-color: var(--uao-line-chip); box-shadow: var(--uao-shadow-bar); color: var(--uao-text); }
.uao-card__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--uao-surface); }
.uao-card__body { display: flex; flex-direction: column; gap: 6px; padding: 9px 10px 10px; }
.uao-card__title { font-size: var(--uao-fs-15); font-weight: 600; line-height: 1.25; }
.uao-card__meta { font-size: var(--uao-fs-12); color: var(--uao-text-2); line-height: 1.35; }
.uao-card__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: var(--uao-fs-12); font-variant-numeric: tabular-nums; }

/* ---------- panels: filter bar, key facts, short answer ---------- */
.uao-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--uao-sp-2) var(--uao-sp-4);
    padding: 10px 12px; border: 1px solid var(--uao-line); border-radius: var(--uao-r-md);
    background: var(--uao-bg); box-shadow: var(--uao-shadow-bar);
}
.uao-bar--sticky { position: sticky; top: 0; z-index: 5; }
.uao-facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, auto); border: 1px solid var(--uao-line); border-radius: var(--uao-r-md); }
.uao-facts > * { padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.uao-facts > * + * { border-left: 1px solid var(--uao-line); }
.uao-facts dt, .uao-facts .uao-facts__k { font-size: var(--uao-fs-11); color: var(--uao-text-2); }
.uao-facts dd, .uao-facts .uao-facts__v { margin: 0; font-weight: 600; }
@media (max-width: 767px) {
    .uao-facts { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
    .uao-facts > * + * { border-left: 0; }
    .uao-facts > * { border-top: 1px solid var(--uao-line); }
    .uao-facts > *:nth-child(-n+2) { border-top: 0; }
    .uao-facts > *:nth-child(even) { border-left: 1px solid var(--uao-line); }
}
.uao-answer {
    display: flex; flex-direction: column; gap: 6px; padding: 12px 16px;
    border: 1px solid var(--uao-line); border-left: 3px solid var(--uao-green-900); border-radius: var(--uao-r);
}
.uao-answer__label { font-size: var(--uao-fs-11); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--uao-green-900); }
.uao-answer p { margin: 0; font-size: var(--uao-fs-16); line-height: 1.5; max-width: 65ch; }
.uao-note-warn { padding: 12px 14px; border: 1px solid var(--uao-pink-700); border-radius: var(--uao-r-md); }
.uao-note-warn > b:first-child { color: var(--uao-pink-800); }
.uao-note { padding: 12px 14px; border-radius: var(--uao-r-md); background: var(--uao-surface); }

/* ---------- table row (comparison and seeding tables) ---------- */
.uao-table { width: 100%; border-collapse: collapse; border: 1px solid var(--uao-line); font-size: var(--uao-fs-13); font-variant-numeric: tabular-nums; }
.uao-table th {
    padding: 9px 14px; text-align: left; background: var(--uao-surface);
    font-size: var(--uao-fs-11); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--uao-text-2);
}
.uao-table th[aria-sort] { color: var(--uao-green-900); }
.uao-table th button { all: unset; cursor: pointer; }
.uao-table td { padding: 5px 14px; border-top: 1px solid var(--uao-line-soft); vertical-align: middle; }
.uao-table tr:hover td { background: #FAFBFB; }
.uao-table__thumb { width: 40px; height: 28px; border-radius: var(--uao-r-sm); object-fit: cover; vertical-align: middle; margin-right: 10px; }
.uao-table-wrap { overflow-x: auto; border-radius: var(--uao-r-md); }

/* ---------- ad slot ---------- */
.uao-adslot { display: flex; flex-direction: column; gap: 4px; }
.uao-adslot__label { font-size: var(--uao-fs-11); letter-spacing: 0.06em; text-transform: uppercase; color: var(--uao-text-2); }
.uao-adslot__box {
    min-height: 90px; border: 1px dashed var(--uao-ad-line); border-radius: var(--uao-r);
    background: repeating-linear-gradient(135deg, var(--uao-ad-fill) 0 10px, var(--uao-bg) 10px 20px);
}
.uao-adslot__box:has(ins, iframe) { border: 0; background: none; }

@media print {
    .uao-adslot, .uao-bar--sticky { display: none !important; }
    .uao-table { font-size: 11px; }
    .uao-table tr { break-inside: avoid; }
}
