/*
Theme Name: Agrin — آگرین
Description: پوستهٔ اختصاصیِ انتشاراتِ آگرین‌کتاب. نیازمندِ افزونهٔ «هستهٔ آگرین».
Version: 0.7.3
Author: Agrin Ketab
Requires PHP: 8.0
Text Domain: agrin
*/

@font-face { font-family: 'Vazirmatn'; font-weight: 400; font-display: swap; src: url(assets/fonts/vazirmatn-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: 'Vazirmatn'; font-weight: 500; font-display: swap; src: url(assets/fonts/vazirmatn-arabic-500-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Vazirmatn'; font-weight: 700; font-display: swap; src: url(assets/fonts/vazirmatn-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Vazirmatn'; font-weight: 400; font-display: swap; src: url(assets/fonts/vazirmatn-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2012-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Vazirmatn'; font-weight: 500; font-display: swap; src: url(assets/fonts/vazirmatn-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-200B, U+2012-206F; }
@font-face { font-family: 'Vazirmatn'; font-weight: 700; font-display: swap; src: url(assets/fonts/vazirmatn-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-200B, U+2012-206F; }
@font-face { font-family: 'Markazi Text'; font-weight: 600; font-display: swap; src: url(assets/fonts/markazi-text-arabic-600-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Markazi Text'; font-weight: 700; font-display: swap; src: url(assets/fonts/markazi-text-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Markazi Text'; font-weight: 600; font-display: swap; src: url(assets/fonts/markazi-text-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-200B, U+2012-206F; }
@font-face { font-family: 'Markazi Text'; font-weight: 700; font-display: swap; src: url(assets/fonts/markazi-text-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-200B, U+2012-206F; }

:root {
	--ink: #15171B; --ink-2: #22252B; --paper: #F6F5F1; --paper-2: #ECEAE3; --white: #FFFFFF;
	--line: #DAD7CE; --muted: #5A5D63; --body: #3D4046;
	--teal: #0E4F55; --teal-ink: #08363A; --teal-soft: #E5EFEE; --amber: #E2A64B; --rust: #B8452E;
	--serif: 'Markazi Text', 'Vazirmatn', serif; --sans: 'Vazirmatn', system-ui, sans-serif;
	--wrap: 1240px; --gutter: 32px; --r: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.9; unicode-bidi: plaintext; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); } a:hover { color: var(--teal-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
bdi { unicode-bidi: isolate; }

/* Buttons */
.agrin-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 1px solid transparent; font-size: 15px; cursor: pointer; font-family: var(--sans); }
.agrin-btn--amber { background: var(--amber); color: var(--ink); } .agrin-btn--amber:hover { background: #d4973c; color: var(--ink); }
.agrin-btn--dark { background: var(--ink); color: var(--paper); } .agrin-btn--dark:hover { background: #000; color: var(--white); }
.agrin-btn--ghost { border-color: #4A4D54; color: var(--paper); } .agrin-btn--ghost:hover { border-color: var(--paper); color: var(--white); }
.agrin-btn--line { border-color: var(--line); color: var(--ink); background: var(--white); } .agrin-btn--line:hover { border-color: var(--ink); color: var(--ink); }
.agrin-btn--light { background: var(--paper); color: var(--teal); }

/* Header */
.site-head { background: var(--ink); color: #E9E7E1; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--paper); }
.brand:hover { color: var(--white); }
.brand__name { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; }
.brand__tag { font-size: 12px; color: #A9A69E; }
.nav ul { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.nav a { color: #E9E7E1; text-decoration: none; display: inline-block; padding-block: 8px; }
.nav a:hover, .nav .current-menu-item > a, .nav .current_page_item > a { color: var(--amber); }
.head-search { display: flex; gap: 8px; }
.head-search input { width: 220px; max-width: 52vw; height: 44px; border-radius: 8px; border: 1px solid #3A3D44; background: var(--ink-2); color: var(--paper); padding: 0 14px; font-family: inherit; font-size: 14px; }
.head-search input::placeholder { color: #A9A69E; }

/* Covers */
.agrin-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 12px 28px rgba(21, 23, 27, .18); background: var(--paper-2); }
.agrin-cover--ph { background: var(--book, var(--teal)); color: var(--paper); padding: 9% 8%; display: flex; flex-direction: column; justify-content: space-between; }
.agrin-cover--ph .ph-pub { font-size: 11px; opacity: .75; }
.agrin-cover--ph .ph-title { font-family: var(--serif); font-weight: 700; font-size: clamp(20px, 2.4vw, 34px); line-height: 1.15; }
.agrin-cover--ph .ph-author { font-size: 12px; opacity: .85; }

/* Hero */
.hero { background: var(--ink); color: var(--paper); border-top: 1px solid #2A2D33; }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-block: 72px 88px; }
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero__kicker { font-size: 13px; font-weight: 700; color: var(--amber); }
.hero__title { font-size: clamp(44px, 6vw, 72px); line-height: 1.08; }
.hero__title a { color: inherit; text-decoration: none; }
.hero__by, .hero__by a { color: #C9C6BE; font-size: 18px; margin: 0; }
.hero__hook { color: #D9D6CF; font-size: 18px; line-height: 2; max-width: 620px; margin: 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__cover { flex: 1 1 280px; display: flex; justify-content: center; }
.hero__cover .agrin-cover { width: 300px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }

/* Sections */
.sec { padding-block: 80px; }
.sec--tint { background: var(--paper-2); }
.sec__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 36px; }
.sec__head h2 { font-size: 44px; }
.sec__head p { margin: 6px 0 0; color: var(--muted); font-size: 16px; width: 100%; }

/* Book grid / cards */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 28px; }
.book-card { display: flex; flex-direction: column; gap: 10px; }
.book-card > a { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.book-card h3 { font-family: var(--sans); font-size: 17px; margin-top: 12px; line-height: 1.6; }
.book-card .by { margin: 0; font-size: 14px; color: var(--muted); }
.book-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 15px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--teal-soft); color: var(--teal); font-weight: 700; text-decoration: none; }

/* Subjects */
.subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.subject { display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.subject:hover { border-color: var(--ink); color: var(--ink); }
.subject b { font-family: var(--serif); font-size: 28px; }
.subject span { font-size: 14px; color: var(--muted); }

/* Press cards */
.press { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.press-card { display: flex; flex-direction: column; gap: 12px; padding: 30px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.press-card:hover { border-color: var(--ink); color: var(--ink); }
.press-card__top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.press-card__top b { color: var(--teal); }
.press-card__title { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.25; }
.press-card__sum { font-size: 15px; line-height: 1.9; color: var(--body); }
.press-card__go { font-size: 14px; font-weight: 700; color: var(--teal); }

/* CTA pair */
.ctas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.cta { padding: 36px; border-radius: var(--r); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta b { font-family: var(--serif); font-size: 34px; }
.cta p { margin: 0; line-height: 1.9; }
.cta--teal { background: var(--teal); color: var(--paper); } .cta--teal p { color: #D7E6E4; }
.cta--ink { background: var(--ink); color: var(--paper); } .cta--ink p { color: #C9C6BE; }

/* Footer */
.site-foot { background: var(--ink); color: #C9C6BE; font-size: 14px; line-height: 2; }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-block: 56px; }
.site-foot b { color: var(--paper); display: block; }
.site-foot .brand__name { font-size: 30px; }
.site-foot a { color: #E9E7E1; }

/* Book page */
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; }
.crumbs a { color: var(--muted); }
.book-top { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; padding-block: 40px 72px; }
.book-top__cover { flex: 1 1 300px; display: flex; justify-content: center; }
.book-top__cover .agrin-cover { width: 340px; box-shadow: 0 30px 60px rgba(21, 23, 27, .28); }
.book-top__info { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.book-top__info h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.1; }
.book-top__by { font-size: 18px; margin: 0; } .book-top__by a { font-weight: 700; }
.book-top__hook { font-size: 17px; line-height: 2; color: var(--body); max-width: 640px; margin: 0; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14px; margin: 0; }
.specs div { background: var(--white); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; font-weight: 700; }
.buy { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 22px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); scroll-margin-top: 20px; }
.buy__price { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; }
.buy__price small { font-size: 13px; color: var(--muted); }
.buy__price strong { font-size: 24px; }
.buy__stores { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.store { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14px; background: var(--white); }
.store:hover { border-color: var(--ink); color: var(--ink); }
.store--first { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
.store--first:hover { color: var(--white); background: #000; }
.buy__none { font-size: 14px; color: var(--muted); margin: 0; flex-basis: 100%; }
.book-body { background: var(--white); border-block: 1px solid var(--line); }
.book-body .wrap { display: flex; flex-wrap: wrap; gap: 56px; padding-block: 64px; }
.book-body__main { flex: 999 1 520px; min-width: 0; }
.book-body__main h2 { font-size: 38px; margin-bottom: 18px; }
.book-body__main h3 { font-family: var(--sans); font-size: 18px; margin: 24px 0 8px; }
.prose { font-size: 17px; line-height: 2.1; color: var(--body); }
.prose ol, .prose ul { padding-inline-start: 22px; }
.book-body__side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.side-box { padding: 26px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.side-box small { font-size: 13px; color: var(--muted); }
.side-box b { font-family: var(--serif); font-size: 28px; }
.side-box p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--body); }
.side-box--teal { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.side-box--teal p { color: #D7E6E4; }
.author-mini { display: flex; gap: 14px; align-items: center; }
.author-mini img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.quote-card { margin: 0; padding: 30px; border-radius: var(--r); background: var(--book, var(--teal)); color: var(--paper); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 240px; }
.quote-card p { margin: 0; font-family: var(--serif); font-size: 28px; line-height: 1.4; font-weight: 600; }
.quote-card cite { font-style: normal; font-size: 13px; opacity: .85; }

/* Notes (posts) */
.post-head { padding-block: 64px 24px; display: flex; flex-direction: column; gap: 18px; }
.post-kicker { font-size: 14px; font-weight: 700; color: var(--rust); }
.post-head h1 { font-size: clamp(40px, 5.5vw, 64px); line-height: 1.1; }
.post-lede { font-size: 20px; line-height: 1.8; color: var(--body); margin: 0; }
.post-date { font-size: 14px; color: var(--muted); }
.post-body { padding-bottom: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.post-body > * { margin-block: 0 1.2em; }
.post-body h2 { font-size: 36px; margin-top: 1.4em; }
.post-body blockquote { margin: 1.6em 0; padding: 12px 0; border: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.post-body blockquote p { font-family: var(--serif); font-size: 34px; line-height: 1.45; font-weight: 600; margin: 0 0 8px; }
.post-body blockquote cite { font-style: normal; font-size: 14px; color: var(--muted); }
.agrin-strip { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding: 24px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); margin: 32px 0; }
@media (min-width: 1100px) { .agrin-strip { margin-inline: -110px; } }
.agrin-strip__cover { width: 110px; flex: none; }
.agrin-strip__cover .agrin-cover { box-shadow: 0 10px 22px rgba(21, 23, 27, .2); }
.agrin-strip__cover .ph-title { font-size: 15px; }
.agrin-strip__cover .ph-pub, .agrin-strip__cover .ph-author { font-size: 9px; }
.agrin-strip__body { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.agrin-strip__title { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.25; }
.agrin-strip__by { font-size: 15px; color: var(--muted); }
.agrin-strip__hook { font-size: 15px; line-height: 1.8; color: var(--body); }
.agrin-strip__buy { flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; }
.agrin-strip__price { font-size: 20px; font-weight: 700; }
.agrin-strip__more { font-size: 13px; font-weight: 700; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.note-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.note-card:hover { border-color: var(--ink); color: var(--ink); }
.note-card small { color: var(--rust); font-weight: 700; font-size: 13px; }
.note-card b { font-family: var(--serif); font-size: 30px; line-height: 1.25; }
.note-card span { color: var(--body); font-size: 15px; line-height: 1.9; }
.pager { display: flex; gap: 10px; justify-content: center; padding-block: 32px; }
.pager .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--white); padding: 0 10px; }
.pager .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Author page */
.author-top { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; padding-block: 56px 40px; }
.author-top img, .author-top .author-ph { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex: none; }
.author-ph { background: var(--paper-2); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 64px; color: var(--muted); }
.author-top h1 { font-size: 52px; }
.author-top p { margin: 6px 0 0; color: var(--muted); font-size: 17px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-size: 14px; }
.filters a.on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); font-weight: 700; }

/* Page */
.page-head { padding-block: 64px 24px; }
.page-head h1 { font-size: 52px; }
.empty { padding: 40px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); text-align: center; }

@media (max-width: 760px) {
	:root { --gutter: 18px; }
	body { font-size: 16px; }
	.sec { padding-block: 52px; }
	.sec__head h2 { font-size: 34px; }
	.hero .wrap { padding-block: 44px 56px; gap: 32px; }
	.hero__cover { display: none; }
	.book-top { gap: 32px; }
	.book-top__cover .agrin-cover { width: 220px; }
	.agrin-strip { margin-inline: 0; }
	.head-search input { width: 100%; max-width: none; }
	.head-search { width: 100%; }
}

/* Persian list numbers */
ol { list-style-type: persian; }

/* ================================================================== *
 * v0.2 — Refined palette: warm ivory, deep ink-brown, muted teal, gold hairlines
 * ================================================================== */
:root {
	--ink: #2A2520; --ink-2: #3A332C; --paper: #F8F5EE; --paper-2: #F0EBE1; --white: #FFFEFB;
	--line: #E3DCCD; --muted: #6E665B; --body: #4A433B;
	--teal: #2F5254; --teal-ink: #213D3F; --teal-soft: #E7EDEA; --gold: #A6803F; --gold-ink: #7A5C26;
	--amber: #A6803F; --rust: #8C3B2E; --night: #2E2925;
}
body { color: var(--ink); }
h1, h2, h3 { font-weight: 600; letter-spacing: 0; }
.skip { background: var(--teal); color: var(--white); }
:focus-visible { outline-color: var(--gold); }

/* Buttons: one calm primary, one hairline secondary */
.agrin-btn { border-radius: 6px; font-weight: 600; }
.agrin-btn--amber, .agrin-btn--dark { background: var(--teal); color: var(--white); }
.agrin-btn--amber:hover, .agrin-btn--dark:hover { background: var(--teal-ink); color: var(--white); }
.agrin-btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.agrin-btn--ghost:hover { background: var(--ink); color: var(--paper); }
.agrin-btn--light { background: var(--white); color: var(--teal); }

/* Header: light, with a gold hairline */
.site-head { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); position: relative; }
.site-head::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); opacity: .55; }
.brand { color: var(--ink); }
.brand:hover { color: var(--teal); }
.brand__tag { color: var(--gold-ink); }
.nav a { color: var(--body); }
.nav a:hover, .nav .current-menu-item > a, .nav .current_page_item > a { color: var(--teal); }
.head-search input { background: var(--white); border-color: var(--line); color: var(--ink); }
.head-search input::placeholder { color: var(--muted); }

/* Subjects dropdown in the nav */
.nav li { position: relative; }
.nav details summary { list-style: none; cursor: pointer; color: var(--body); padding-block: 8px; display: inline-flex; align-items: center; gap: 6px; }
.nav details summary::-webkit-details-marker { display: none; }
.nav details summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav details[open] summary, .nav details summary:hover { color: var(--teal); }
.nav details ul { position: absolute; inset-inline-start: -16px; top: 100%; z-index: 20; display: grid; gap: 0; min-width: 230px; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px rgba(42, 37, 32, .12); }
.nav details ul a { display: block; padding: 8px 12px; border-radius: 6px; }
.nav details ul a:hover { background: var(--paper-2); }

/* Hero: warm paper, not black */
.hero { background: var(--paper-2); color: var(--ink); border-top: 0; }
.hero__kicker { color: var(--rust); letter-spacing: 0; }
.hero__by, .hero__by a { color: var(--body); }
.hero__hook { color: var(--body); }
.hero__cover .agrin-cover { box-shadow: 0 24px 48px rgba(42, 37, 32, .22), 0 2px 0 rgba(42, 37, 32, .06); }

/* Section heads with a gold rule */
.sec__head { padding-bottom: 18px; border-bottom: 1px solid var(--line); position: relative; }
.sec__head::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -1px; width: 72px; height: 2px; background: var(--gold); }
.sec--tint { background: var(--paper-2); }

/* Cards & chips */
.agrin-cover { box-shadow: 0 10px 24px rgba(42, 37, 32, .14); }
.chip { background: var(--teal-soft); color: var(--teal); }
.press-card, .note-card, .subject, .agrin-strip, .buy, .side-box { background: var(--white); border-color: var(--line); }
.press-card:hover, .note-card:hover, .subject:hover { border-color: var(--gold); }
.press-card__top b, .press-card__go { color: var(--teal); }
.store--first { background: var(--teal); border-color: var(--teal); color: var(--white); }
.store--first:hover { background: var(--teal-ink); color: var(--white); }
.store:hover { border-color: var(--gold); }
.post-kicker, .note-card small { color: var(--rust); }
.post-body blockquote { border-top-color: var(--gold); }
.side-box--teal { background: var(--teal); border-color: var(--teal); }

/* CTAs: one teal, one paper */
.cta--ink { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.cta--ink p { color: var(--body); }

/* Footer: warm night, not black */
.site-foot { background: var(--night); color: #CFC7BA; }
.site-foot a { color: #EDE6D9; }
.site-foot .wrap { border-top: 1px solid rgba(166, 128, 63, .35); }

/* FAQ blocks */
.wp-block-details, .prose details { border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding: 0 20px; margin: 0 0 12px; }
.wp-block-details summary, .prose details summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink); }
.wp-block-details[open] summary, .prose details[open] summary { color: var(--teal); }
.wp-block-details > *:not(summary), .prose details > *:not(summary) { margin: 0 0 16px; }

@media (max-width: 760px) {
	.nav details ul { position: static; box-shadow: none; margin-top: 4px; }
}

.subject b { line-height: 1.3; }

/* Brand mark */
.brand { align-items: center; gap: 12px; }
.brand__mark { width: 52px; height: 52px; flex: none; }
.foot-logo { width: 120px; height: auto; margin-bottom: 6px; }
.quote-card { position: relative; }
.quote-card__mark { width: 40px; height: 40px; opacity: .9; }
@media (max-width: 760px) { .brand__mark { width: 42px; height: 42px; } }

/* v0.4 — forms, Q&A, forthcoming */
.chip--soon { background: #F3E8D6; color: var(--gold-ink); }
.nav__sep { height: 1px; background: var(--line); margin: 6px 8px; }
.agrin-form { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); margin: 0 0 40px; position: relative; }
.agrin-form h2 { font-size: 30px; margin-bottom: 4px; }
.agrin-form label, .agrin-form legend { font-size: 14px; font-weight: 600; }
.agrin-form input, .agrin-form select, .agrin-form textarea { width: 100%; min-height: 46px; border-radius: 8px; border: 1px solid #CFC7B7; background: var(--paper); padding: 10px 12px; font-family: inherit; font-size: 15px; color: var(--ink); }
.agrin-form textarea { line-height: 1.9; resize: vertical; }
.agrin-form input:focus, .agrin-form select:focus, .agrin-form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.agrin-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.agrin-form__row > div { display: flex; flex-direction: column; gap: 6px; }
.agrin-form__kinds { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 8px; }
.agrin-form__kinds label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.agrin-form__kinds input { width: auto; min-height: 0; }
.agrin-form__hint { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.8; }
.agrin-form button { align-self: flex-start; margin-top: 6px; }
.agrin-notice { margin: 0; padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.agrin-notice--ok { background: var(--teal-soft); color: var(--teal); }
.agrin-notice--err { background: #F6E3DF; color: var(--rust); }
.qa__h { font-size: 30px; margin: 32px 0 14px; }
.qa__item { border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding: 0 20px; margin: 0 0 12px; }
.qa__item summary { cursor: pointer; padding: 16px 0; font-weight: 600; line-height: 1.8; }
.qa__item[open] summary { color: var(--teal); }
.qa__answer { padding: 0 0 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.qa__answer p { margin: 0 0 8px; line-height: 2; }
.qa__answer small { color: var(--muted); }
.qa__waiting { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qa__waiting li { padding: 14px 18px; border-radius: 10px; border: 1px dashed #CFC7B7; display: flex; flex-direction: column; gap: 4px; line-height: 1.8; }
.qa__waiting small { color: var(--muted); }

/* ---------- v0.5: bibliographic record + QR ---------- */
.bib{width:100%;border-collapse:collapse;margin:8px 0 28px;font-size:15px;background:#FFFDF8;border-radius:10px;overflow:hidden}
.bib th,.bib td{padding:10px 14px;border-bottom:1px solid rgba(42,37,32,.10);text-align:right;vertical-align:top}
.bib th{width:34%;font-weight:600;color:#6B6258;white-space:nowrap}
.bib td{color:#2A2520}
.bib tr:last-child th,.bib tr:last-child td{border-bottom:0}
.qr-box{display:flex;gap:14px;align-items:center}
.qr-box__img{flex:0 0 96px;background:#fff;border-radius:8px;padding:4px;line-height:0}
.qr-box__img svg{width:100%;height:auto;display:block}
.qr-box p{margin:4px 0 6px;font-size:14px}
@media (max-width:600px){.bib th{white-space:normal;width:40%}}

/* ================================================================== *
 * v0.6 — top bar with «خانه», phone menu, cover showcase, prices
 * ================================================================== */
html, body { overflow-x: clip; }
img, svg, video, iframe, table { max-width: 100%; }
.prose, .post-body, .book-top__info, .book-body__main { overflow-wrap: anywhere; }

/* Top bar: «خانه» always top-right, the managing director's line at the other end */
.topbar { background: var(--night); color: #E9E2D4; font-size: 13.5px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; }
.topbar a:hover { color: var(--white); }
.topbar__home { font-weight: 700; padding-inline-end: 14px; border-inline-end: 1px solid rgba(233, 226, 212, .18); }
.topbar__home[aria-current] { color: #E7C98D; }
.topbar__num { font-weight: 700; letter-spacing: .02em; font-feature-settings: "tnum"; }
.topbar__call svg { color: #E7C98D; }

/* Main menu */
.nav .menu-item-home > a { font-weight: 700; }
.nav-toggle { display: none; }
.site-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; flex: 1 1 auto; justify-content: flex-end; }
.site-menu .nav { margin-inline-end: auto; }

@media (max-width: 960px) {
	.site-head { position: sticky; top: 0; z-index: 30; }
	.site-head .wrap { flex-wrap: nowrap; padding-block: 10px; }
	.brand__name { font-size: 28px; }
	.brand__tag { display: none; }
	.nav-toggle { display: inline-flex; align-items: center; gap: 10px; margin-inline-start: auto; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 600 14px var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
	.nav-toggle__bars { position: relative; }
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
	.nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
	.site-head.is-open .nav-toggle__bars { background: transparent; }
	.site-head.is-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
	.site-head.is-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
	.site-menu { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 14px; padding: 14px var(--gutter) 22px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(42, 37, 32, .14); max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; }
	.site-head.is-open .site-menu { display: flex; }
	.site-menu .nav { margin: 0; }
	.nav ul { flex-direction: column; gap: 0; font-size: 16px; }
	.nav li { border-bottom: 1px solid var(--line); }
	.nav a, .nav details summary { display: flex; min-height: 48px; align-items: center; padding-block: 6px; }
	.nav details summary { justify-content: space-between; }
	.nav details ul { position: static; min-width: 0; padding: 0 0 8px; border: 0; box-shadow: none; background: transparent; margin: 0; }
	.nav details ul li { border: 0; }
	.nav details ul a { min-height: 42px; padding: 4px 14px; font-size: 15px; color: var(--muted); }
	.nav__sep { display: none; }
	.head-search { width: 100%; order: -1; }
	.head-search input { width: 100%; max-width: none; height: 48px; font-size: 16px; }
	html.menu-open { overflow: hidden; }
}
@media (max-width: 520px) {
	.topbar { font-size: 13px; }
	.topbar__label { display: none; }
	.topbar__call::before { content: "مدیرِ مسئول"; opacity: .75; }
}

/* Showcase: the newest books fanned out, the newest in the middle (after Danjeh's shelf banner) */
.showcase { background: radial-gradient(60% 70% at 50% 38%, #FFFDF7 0%, var(--paper-2) 62%, #E9E1D1 100%); overflow: hidden; border-bottom: 1px solid var(--line); }
.showcase__stage { --w: clamp(150px, 19vw, 270px); --step: clamp(78px, 11.5vw, 178px); position: relative; height: calc(var(--w) * 1.5 + 70px); max-width: 1400px; margin: 0 auto; perspective: 1600px; }
.fan { position: absolute; top: 34px; left: 50%; width: var(--w); transform: translateX(calc(-50% + var(--i) * var(--step) * -1)) translateY(calc(var(--a) * 14px)) scale(calc(1 - var(--a) * .1)) rotateY(calc(var(--i) * 7deg)); transform-origin: 50% 100%; z-index: calc(10 - var(--a)); transition: transform .45s cubic-bezier(.2, .8, .2, 1), filter .3s; filter: saturate(calc(1 - var(--a) * .08)); }
.fan .agrin-cover { border-radius: 3px 6px 6px 3px; box-shadow: 0 2px 0 rgba(42, 37, 32, .08), 0 18px 34px rgba(42, 37, 32, .26), 0 40px 70px rgba(42, 37, 32, .16); }
.fan .agrin-cover--ph .ph-title { font-size: clamp(15px, 1.7vw, 24px); }
.fan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 9%, transparent 92%, rgba(0, 0, 0, .12)); pointer-events: none; }
.fan:hover, .fan:focus-visible { transform: translateX(calc(-50% + var(--i) * var(--step) * -1)) translateY(calc(var(--a) * 14px - 12px)) scale(calc(1.02 - var(--a) * .1)) rotateY(0deg); z-index: 20; filter: none; }
.fan--lead .agrin-cover { box-shadow: 0 2px 0 rgba(42, 37, 32, .08), 0 24px 44px rgba(42, 37, 32, .32), 0 60px 90px rgba(42, 37, 32, .18); }
.showcase__text { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-block: 6px 64px; }
.showcase__text .hero__title { font-size: clamp(34px, 4.6vw, 60px); max-width: 16em; }
.showcase__text .hero__hook { max-width: 40em; }
.showcase__text .hero__cta { justify-content: center; }
@media (max-width: 760px) {
	.showcase__stage { --w: clamp(120px, 36vw, 170px); --step: clamp(54px, 17vw, 84px); }
	.fan--far { opacity: 0; pointer-events: none; }
	.showcase__nav { width: 38px; height: 38px; font-size: 22px; }
	.showcase__text { padding-bottom: 44px; }
}
/* v0.7.1 — every book rotates through the showcase */
.fan { transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s, filter .3s; }
.fan--off { opacity: 0; pointer-events: none; }
.showcase__stage { overscroll-behavior-x: contain; touch-action: pan-y; }
.fan:not(.fan--lead) { cursor: pointer; }
.showcase__nav { position: absolute; top: calc(34px + var(--w) * .75); transform: translateY(-50%); z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 253, 247, .92); color: var(--ink, #2A2520); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(42, 37, 32, .14); display: grid; place-items: center; transition: background .2s, transform .2s; }
.showcase__nav:hover, .showcase__nav:focus-visible { background: #fff; transform: translateY(-50%) scale(1.06); }
.showcase__nav--prev { right: max(12px, calc(50% - 680px)); }
.showcase__nav--next { left: max(12px, calc(50% - 680px)); }
.showcase__text .hero__title a, .showcase__text .hero__by, .showcase__text .hero__hook { transition: opacity .25s; }
.showcase.is-swapping .hero__title a, .showcase.is-swapping .hero__by, .showcase.is-swapping .hero__hook { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .fan, .showcase__text * { transition: none !important; } }

/* Prices: list, discount, final */
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-weight: 700; font-size: 15px; }
.price__was { color: var(--muted); font-weight: 500; font-size: 13px; text-decoration-thickness: 1.5px; }
.price__badge { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: #F6E3DF; color: var(--rust); }
.price--off .price__now { color: var(--rust); }
.buy__price small del { margin-inline-start: 6px; }
.buy__off { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #F6E3DF; color: var(--rust); }
.buy__h { flex-basis: 100%; font-size: 13px; font-weight: 700; color: var(--muted); }
.buy__stores--e { padding-top: 12px; border-top: 1px dashed var(--line); }
.store--e { gap: 8px; }
/* v0.7.3 — e-book stores as solid buttons in each store's own colour */
.store--e, .ebtn { --sb: var(--ink); --sb-h: #000; background: var(--sb); border-color: var(--sb); color: #fff; font-weight: 700; }
.store--e:hover, .store--e:focus-visible, .ebtn:hover, .ebtn:focus-visible { background: var(--sb-h); border-color: var(--sb-h); color: #fff; }
.store--taaghche, .ebtn--taaghche { --sb: #D8383F; --sb-h: #B32A30; }
.store--fidibo, .ebtn--fidibo { --sb: #5247E6; --sb-h: #3E33C7; }
.store--ketabrah, .ebtn--ketabrah { --sb: #1E6FB8; --sb-h: #155894; }
.store--e::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center/contain no-repeat; }
.buy__call { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.buy__call a { font-weight: 700; }
.book-card__e { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); margin-top: -2px; }
.book-card__e { align-items: center; }
.book-card__e a.ebtn { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--sb); font-size: 12.5px; text-decoration: none; }

/* Phone: comfortable reading and tapping */
@media (max-width: 760px) {
	.books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
	.book-card h3 { font-size: 15px; }
	.book-card .by { font-size: 13px; }
	.sec__head { margin-bottom: 26px; }
	.sec__head h2 { font-size: 30px; }
	.book-top { padding-block: 24px 48px; }
	.book-top__info h1 { font-size: 34px; }
	.specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.buy { padding: 18px; }
	.store { min-height: 46px; flex: 1 1 auto; justify-content: center; }
	.book-body .wrap { padding-block: 44px; gap: 36px; }
	.book-body__main h2 { font-size: 30px; }
	.press, .ctas, .notes, .quotes { grid-template-columns: minmax(0, 1fr); }
	.press-card, .cta, .note-card, .quote-card, .side-box, .agrin-form { padding: 22px; }
	.cta b, .press-card__title, .note-card b { font-size: 26px; }
	.subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.subject { padding: 18px; } .subject b { font-size: 22px; }
	.page-head h1, .author-top h1 { font-size: 36px; }
	.post-body blockquote p { font-size: 26px; }
	.crumbs { font-size: 13px; padding-top: 16px; }
	.agrin-form input, .agrin-form select, .agrin-form textarea { font-size: 16px; }
	.site-foot .wrap { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 40px calc(40px + env(safe-area-inset-bottom)); }
	.filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
	.filters a { flex: none; }
}
@media (max-width: 380px) { .books { gap: 22px 12px; } }
@media (hover: none) { .fan:hover { transform: translateX(calc(-50% + var(--i) * var(--step) * -1)) translateY(calc(var(--a) * 14px)) scale(calc(1 - var(--a) * .1)) rotateY(calc(var(--i) * 7deg)); } }

/* v0.6 fixes */
.specs { gap: 0; background: var(--white); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.specs div { border-inline-start: 1px solid var(--line); border-top: 1px solid var(--line); margin-inline-start: -1px; margin-top: -1px; }
.specs bdi, .buy__call bdi, .topbar__num, .site-foot bdi { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1280px) {
	.brand__tag { display: none; }
	.nav ul { gap: 6px 16px; font-size: 14.5px; }
	.head-search input { width: 170px; }
	.site-head .wrap { gap: 12px; }
}

/* ================================================================== *
 * v0.7 — justified intro text, minimal prices, sales agents
 * ================================================================== */
/* Introductions and publisher pages: justified, like a printed page */
.prose p, .prose li, .book-top__hook, .page-head .prose, .ag-desc p, .author-top p, .post-body p {
	text-align: justify; text-justify: inter-word; hyphens: none; -webkit-hyphens: none;
}
.prose p { text-align-last: start; }

/* Price: struck list price, the percentage, the final price — nothing else */
.price { gap: 2px 8px; }
.price--none { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.price__was { color: var(--muted); font-weight: 500; font-size: 13.5px; text-decoration: line-through; text-decoration-color: var(--rust); text-decoration-thickness: 1.5px; }
.price__badge { font-size: 11.5px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 6px; background: var(--rust); color: #fff; }
.price--off .price__now { color: var(--ink); }
.buy__price { gap: 4px; }
.buy__label { font-size: 13px; color: var(--muted); }
.buy__row { display: flex; align-items: center; gap: 10px; }
.buy__was { font-size: 17px; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rust); text-decoration-thickness: 2px; }
.buy__off { font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 6px; background: var(--rust); color: #fff; }
.buy__price strong { font-size: 30px; line-height: 1.3; }
.buy__soon { color: var(--muted); font-size: 22px !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Sales agents */
.ag-tools { display: grid; gap: 14px; margin-bottom: 30px; }
.ag-tools input { height: 48px; max-width: 460px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font: 16px var(--sans); }
.ag-tools .filters { margin: 0; }
.ag-tools .filters button { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 14px var(--sans); cursor: pointer; }
.ag-tools .filters button small { color: var(--muted); }
.ag-tools .filters button.is-on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); font-weight: 700; }
.ag-group { margin-bottom: 40px; }
.ag-prov { font-size: 26px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.ag-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); scroll-margin-top: 120px; }
.ag-card:target { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(166, 128, 63, .18); }
.ag-card header { display: flex; gap: 14px; align-items: center; }
.ag-logo { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
.ag-card h3 { font-size: 19px; margin: 0; }
.ag-meta { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.ag-desc { font-size: 14.5px; } .ag-desc p { margin: 0; }
.ag-card dl { display: grid; gap: 8px; margin: 0; }
.ag-card dl div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: 14.5px; }
.ag-card dt { color: var(--muted); } .ag-card dd { margin: 0; }
.ag-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ag-actions .agrin-btn { min-height: 42px; padding: 0 14px; font-size: 14px; }
@media (max-width: 760px) { .ag-card { padding: 18px; } .ag-actions .agrin-btn { flex: 1 1 auto; justify-content: center; } }
.specs { display: flex; flex-wrap: wrap; }
.specs div { flex: 1 1 150px; }
.page-head + .sec { padding-top: 16px; }
.ag-actions .agrin-btn { gap: 6px; }
