/*
Theme Name: Thank You Letters
Theme URI: https://thankyou-letters.com/
Description: Thank you messages, notes, replies and quotes for every person and occasion, with a note builder. Airmail header, envelope hero, postage-stamp sections and copyable message cards.
Version: 1.0.0
Text Domain: thankyouletters
License: GPL-2.0-or-later
*/

@font-face { font-family: "Hedvig"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/hedvig-letters-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Host Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/host-grotesk-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Host Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url(assets/fonts/host-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Host Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url(assets/fonts/host-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Host Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url(assets/fonts/host-grotesk-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Gochi Hand"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/gochi-hand-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "TyDeva"; font-weight: 400; font-display: swap; src: url(assets/fonts/noto-sans-devanagari-devanagari-400-normal.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "TyDeva"; font-weight: 600 700; font-display: swap; src: url(assets/fonts/noto-sans-devanagari-devanagari-600-normal.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
	--ink: #2a1830;
	--ink-2: #5d4b60;
	--ink-3: #8a7a8c;
	--line: #eee2e0;
	--bg: #ffffff;
	--blush: #fff4f0;
	--blush-2: #ffe4dc;
	--coral: #e2553f;
	--coral-d: #c13f2b;
	--butter: #ffd76a;
	--air: #2f6fdb;
	--mint: #d9f3e8;
	--st: var(--coral);
	--r: 18px;
	--shadow: 0 1px 0 rgba(42, 24, 48, .04), 0 14px 30px -20px rgba(42, 24, 48, .38);
	--sans: "Host Grotesk", "TyDeva", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--serif: "Hedvig", "TyDeva", Georgia, "Times New Roman", serif;
	--hand: "Gochi Hand", "Comic Sans MS", "TyDeva", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.68 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-d); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--air); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.12; }
button, input, select, textarea { font: inherit; color: inherit; }
.ty-wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.ty-skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--butter); color: var(--ink); padding: 8px 14px; border-radius: 10px; }
.ty-skip:focus { left: 12px; }
.ty-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ty-ico { flex: none; }

/* ------------------------------------------------------------------ buttons */
.ty-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 2px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease; }
.ty-btn:hover { transform: translateY(-1px); }
.ty-btn--main { background: var(--coral); color: #fff; box-shadow: 0 10px 20px -12px rgba(194, 63, 43, .9); }
.ty-btn--main:hover { background: var(--coral-d); color: #fff; }
.ty-btn--ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.ty-btn--ghost:hover { background: var(--ink); color: #fff; }
.ty-chipbtn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .92rem; cursor: pointer; }
.ty-chipbtn:hover { background: var(--ink); color: #fff; }

/* --------------------------------------------------------- header (airmail) */
.ty-mast { position: relative; background: var(--ink); color: #fff; z-index: 20; }
.ty-mast::after { content: ""; display: block; height: 7px; background: repeating-linear-gradient(135deg, var(--coral) 0 14px, #fff 14px 21px, var(--air) 21px 35px, #fff 35px 42px); }
.ty-mast-row { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.ty-logo { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font: 400 1.42rem/1 var(--serif); white-space: nowrap; }
.ty-logo:hover { color: #fff; }
.ty-logo em { font: 400 1.5rem/1 var(--hand); font-style: normal; color: var(--butter); margin-left: 2px; }
.ty-nav { display: flex; gap: 2px; margin-left: auto; }
.ty-nav a { position: relative; color: #f2e8f0; text-decoration: none; font-weight: 500; font-size: .98rem; padding: 8px 12px 8px 24px; border-radius: 999px; }
.ty-nav a::before { content: ""; position: absolute; left: 10px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.ty-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ty-cta { display: inline-flex; align-items: center; gap: 7px; background: var(--butter); color: var(--ink); text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px; white-space: nowrap; }
.ty-cta:hover { background: #fff; color: var(--ink); }
.ty-menubtn { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.ty-menubtn-bars, .ty-menubtn-bars::before, .ty-menubtn-bars::after { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform .2s ease; }
.ty-menubtn-bars::before, .ty-menubtn-bars::after { content: ""; position: absolute; left: 0; }
.ty-menubtn-bars::before { top: -6px; }
.ty-menubtn-bars::after { top: 6px; }
.ty-menubtn[aria-expanded="true"] .ty-menubtn-bars { background: transparent; }
.ty-menubtn[aria-expanded="true"] .ty-menubtn-bars::before { transform: translateY(6px) rotate(45deg); }
.ty-menubtn[aria-expanded="true"] .ty-menubtn-bars::after { transform: translateY(-6px) rotate(-45deg); }
.ty-drawer { background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .1); padding: 10px 0 22px; }
.ty-drawer-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ty-drawer-list a { display: flex; flex-direction: column; padding: 12px 14px 12px 18px; border-radius: 14px; background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; border-left: 4px solid var(--st, var(--butter)); }
.ty-drawer-list b { font-weight: 600; }
.ty-drawer-list span { font-size: .85rem; color: #d9c9d6; }

/* --------------------------------------------------------------------- hero */
.ty-hero { background: radial-gradient(1100px 520px at 85% 0%, var(--blush-2), transparent 60%), radial-gradient(800px 480px at 0% 100%, #fff0d6, transparent 60%), var(--blush); padding: 52px 0 34px; overflow: hidden; }
.ty-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.ty-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font-weight: 600; color: var(--ink-2); font-size: .95rem; }
.ty-eyebrow span { background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.ty-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); margin: 0 0 18px; }
.ty-hero-lede { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; margin: 0 0 26px; }
.ty-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.ty-envelope { position: relative; margin: 0 auto; width: 100%; max-width: 520px; aspect-ratio: 52 / 46; }
.ty-env-back { position: absolute; left: 0; right: 0; bottom: 12%; height: 62%; background: #f2b9a9; border-radius: 16px; }
.ty-env-back::before { content: ""; position: absolute; left: 0; right: 0; bottom: 99%; height: 46%; background: #eda692; clip-path: polygon(0 100%, 50% 0, 100% 100%); border-radius: 10px 10px 0 0; }
.ty-env-card { position: absolute; z-index: 2; left: 7%; right: 7%; top: 0; height: 72%; background: #fffdfa; border-radius: 14px; padding: 26px 28px; box-shadow: 0 18px 40px -22px rgba(42, 24, 48, .55); transform: rotate(-2.5deg); background-image: repeating-linear-gradient(transparent 0 33px, rgba(47, 111, 219, .1) 33px 34px); background-position: 0 18px; overflow: hidden; }
.ty-env-card.is-in { animation: tyRise .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes tyRise { from { transform: translateY(46px) rotate(-1deg); opacity: .2; } to { transform: rotate(-2.5deg); opacity: 1; } }
.ty-env-card p { margin: 0; font-family: var(--hand); color: var(--ink); }
.ty-env-to { font-size: 1.5rem; line-height: 1.2; margin-bottom: 6px !important; }
.ty-env-line { font-size: clamp(1.15rem, 2.1vw, 1.42rem); line-height: 34px; }
.ty-env-from { font-size: 1.3rem; text-align: right; margin-top: 8px !important; color: var(--coral-d) !important; }
.ty-env-front { position: absolute; left: 0; right: 0; bottom: 12%; height: 46%; background: #f6cdbf; border-radius: 0 0 16px 16px; clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .03); }
.ty-env-front::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; border-radius: 0 0 16px 16px; background: repeating-linear-gradient(135deg, var(--coral) 0 12px, #fff 12px 18px, var(--air) 18px 30px, #fff 30px 36px); }
.ty-env-stamp { position: absolute; z-index: 3; right: 18px; bottom: 24px; width: 54px; height: 54px; background: url(assets/icons/mark.svg) center / contain no-repeat; transform: rotate(6deg); }
.ty-env-post { position: absolute; left: 20px; bottom: 26px; font: 600 .78rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(42, 24, 48, .55); border: 1.5px solid rgba(42, 24, 48, .3); border-radius: 999px; padding: 6px 12px; transform: rotate(-4deg); }
.ty-env-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 10px; }

.ty-stamps { list-style: none; margin: 36px auto 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; }
.ty-stamps li a { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 128px; padding: 20px 16px 16px; text-decoration: none; color: var(--ink); filter: drop-shadow(0 8px 12px rgba(42, 24, 48, .14)); background: radial-gradient(circle at 7px 7px, transparent 4px, #fff 4.6px) -7px -7px / 14px 14px; transition: transform .18s ease; }
.ty-stamps li a::before { content: ""; position: absolute; inset: 7px; background: #fff; border-radius: 3px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--st) 35%, transparent); }
.ty-stamps li a::after { content: ""; position: absolute; left: 15px; right: 15px; top: 15px; height: 36px; border-radius: 3px; background: linear-gradient(135deg, var(--st), color-mix(in srgb, var(--st) 60%, #fff)); }
.ty-stamps li a:hover { transform: translateY(-3px) rotate(-1deg); }
.ty-stamps b, .ty-stamps small { position: relative; z-index: 1; }
.ty-stamps b { font: 400 1.05rem/1.2 var(--serif); }
.ty-stamps small { color: var(--ink-3); font-weight: 600; font-size: .82rem; margin-top: 4px; }

/* ----------------------------------------------------------- note builder */
.ty-builder-band { background: var(--ink); color: #fff; padding: 56px 0 60px; margin-top: 0; }
.ty-builder-head { max-width: 780px; margin-bottom: 26px; }
.ty-builder-head h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin: 0 0 10px; }
.ty-builder-head p { color: #e2d4df; margin: 0; font-size: 1.08rem; }
.ty-tool { scroll-margin-top: 16px; }
.ty-nb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; background: #fff; color: var(--ink); border-radius: 26px; padding: 28px; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .6); }
.ty-nb-set { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.ty-nb-set legend { font-weight: 700; margin-bottom: 9px; padding: 0; }
.ty-nb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ty-nb-chips label { position: relative; }
.ty-nb-chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ty-nb-chips span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--blush); font-weight: 500; font-size: .95rem; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.ty-nb-chips input:checked + span { background: var(--coral); border-color: var(--coral); color: #fff; }
.ty-nb-chips input:focus-visible + span { outline: 3px solid var(--air); outline-offset: 2px; }
.ty-nb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ty-nb-fields label, .ty-nb-edit { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .92rem; }
.ty-nb-wide { grid-column: 1 / -1; }
.ty-nb input[type="text"], .ty-nb textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; font-weight: 400; font-size: 1rem; }
.ty-nb input[type="text"]:focus, .ty-nb textarea:focus { border-color: var(--air); outline: none; box-shadow: 0 0 0 3px rgba(47, 111, 219, .18); }
.ty-nb textarea { resize: vertical; line-height: 1.5; }
.ty-nb-out { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ty-nb-card { --sw: #ffd9cf; border-radius: 20px; padding: 26px; background: var(--sw); transition: background .2s ease; }
.ty-nb-card[data-sw="coral"] { --sw: #ffd9cf; }
.ty-nb-card[data-sw="butter"] { --sw: #ffe9a8; }
.ty-nb-card[data-sw="mint"] { --sw: #cfeedf; }
.ty-nb-card[data-sw="lilac"] { --sw: #e3dcff; }
.ty-nb-card[data-sw="sky"] { --sw: #d4e7ff; }
.ty-nb-card[data-sw="paper"] { --sw: #f3eeee; }
.ty-nb-paper { background: #fffdfa; border-radius: 14px; padding: 24px 26px; min-height: 250px; transform: rotate(-1deg); box-shadow: 0 16px 30px -20px rgba(42, 24, 48, .5); outline: 1.5px solid rgba(226, 85, 63, .28); outline-offset: -10px; }
.ty-nb-text { margin: 0; white-space: pre-wrap; font: 400 var(--fs, 1.5rem)/1.38 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.ty-nb-sw { display: flex; gap: 10px; }
.ty-nb-sw button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: var(--sw); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.ty-nb-sw button[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.ty-nb-from { margin: 0; font-size: .92rem; background: var(--mint); border-radius: 12px; padding: 10px 14px; }
.ty-nb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ty-nb-actions .ty-btn { padding: 10px 16px; font-size: .95rem; }

/* ------------------------------------------------------------- page header */
.ty-head { background: linear-gradient(180deg, color-mix(in srgb, var(--st) 13%, #fff) 0%, #fff 100%); padding: 22px 0 34px; }
.ty-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink-3); margin-bottom: 18px; }
.ty-trail a { color: var(--ink-2); text-decoration: none; }
.ty-trail a:hover { text-decoration: underline; }
.ty-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 46px; align-items: center; }
.ty-head h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin: 0 0 14px; }
.ty-postmark { display: inline-flex; align-items: center; gap: 0; margin: 0 0 16px; border: 2px solid var(--st); border-radius: 999px; overflow: hidden; font-size: .88rem; font-weight: 600; }
.ty-postmark a { background: var(--st); color: #fff; text-decoration: none; padding: 5px 14px; }
.ty-postmark em { font-style: normal; color: var(--ink); padding: 5px 14px; background: #fff; }
.ty-standfirst { font-size: 1.18rem; color: var(--ink-2); margin: 0 0 16px; max-width: 40em; }
.ty-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ty-tags li { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.ty-tags-date { border-style: dashed !important; font-weight: 500 !important; }
.ty-head-fig { margin: 0; }
.ty-head-fig img { width: 100%; border-radius: 18px; border: 8px solid #fff; box-shadow: 0 24px 40px -26px rgba(42, 24, 48, .6); transform: rotate(2deg); }

/* ------------------------------------------------------------ reading area */
.ty-read { padding: 34px 20px 10px; }
.ty-read--rail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.ty-read--narrow { max-width: 820px; }
.ty-read--home { max-width: 980px; padding-top: 48px; }
.ty-rail { display: none; }
.ty-article { min-width: 0; }
.ty-article > :first-child { margin-top: 0; }
.ty-article h2 { font-size: clamp(1.6rem, 2.6vw, 2.05rem); margin: 0 0 14px; }
.ty-article h3 { font: 600 1.16rem/1.35 var(--sans); margin: 26px 0 8px; }
.ty-article p { margin: 0 0 16px; }
.ty-article ul, .ty-article ol { padding-left: 1.3em; margin: 0 0 18px; }
.ty-article li { margin: 0 0 6px; }
.ty-article li::marker { color: var(--st); font-weight: 700; }
.ty-intro p:first-child { font-size: 1.2rem; color: var(--ink); }
.ty-intro { margin-bottom: 26px; }
.ty-part { margin: 0 0 46px; scroll-margin-top: 16px; }
.ty-key { margin: 0 0 32px; background: var(--blush); border-radius: var(--r); padding: 18px 20px 6px; position: relative; }
.ty-key::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: var(--r) var(--r) 0 0; background: repeating-linear-gradient(135deg, var(--st) 0 12px, transparent 12px 20px); opacity: .7; }
.ty-key-h { margin: 6px 0 10px !important; font: 400 1.25rem/1.2 var(--serif); }
.ty-key ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 18px; }
.ty-key li { margin: 0 0 14px; }
.ty-key-name { margin: 0 0 2px !important; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-d); }
.ty-key-val { font-weight: 500; line-height: 1.45; }

.ty-toc { margin: 0 0 32px; }
.ty-toc > p { margin: 0 0 8px; font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ty-toc ol { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.ty-toc li { margin: 0; flex: none; }
.ty-toc a { display: block; white-space: nowrap; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.ty-toc a[aria-current="true"], .ty-toc a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* messages: each one a card with Copy and Card buttons */
.ty-article ul.msgs { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ty-article ul.msgs > li { position: relative; display: flex; flex-direction: column; margin: 0; background: #fff; border: 1.5px solid var(--line); border-top: 4px solid var(--st); border-radius: var(--r); padding: 18px 18px 12px; box-shadow: var(--shadow); font-size: 1.05rem; line-height: 1.6; transition: background .2s ease, border-color .2s ease; }
.ty-article ul.msgs > li::before { content: attr(data-n); position: absolute; right: 14px; top: 10px; font: 400 1rem/1 var(--hand); color: var(--ink-3); }
.ty-article ul.msgs > li em { display: block; color: var(--ink-2); font-size: .95rem; margin-top: 6px; }
.ty-article ul.msgs > li.is-copied, .ty-article .sample.is-copied { background: var(--mint); border-color: #9fdcc1; }
.ty-msg-bar { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 12px; }
.ty-msg-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: .86rem; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; }
.ty-msg-btn:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.ty-msg-btn--card { color: var(--coral-d); }
.ty-article .sample { position: relative; margin: 0 0 22px; padding: 22px 26px 14px; border-radius: var(--r); background-color: #fffdf8; background-image: repeating-linear-gradient(transparent 0 31px, rgba(47, 111, 219, .1) 31px 32px); background-position: 0 14px; border: 1.5px solid #f1e6da; box-shadow: var(--shadow); line-height: 32px; }
.ty-article .sample p { margin: 0 0 0; }
.ty-article .sample p + p { margin-top: 32px; }
.ty-article .sample p:first-child { font-family: var(--hand); font-size: 1.3rem; }
.ty-article .sample h3 { margin: 0 0 4px; }
.ty-article .sample .ty-msg-bar { padding-top: 10px; }
.ty-article .note, .ty-article .tip { margin: 0 0 22px; padding: 14px 18px; border-radius: 14px; background: #eef4ff; border-left: 5px solid var(--air); }
.ty-article .tip { background: #fff7dc; border-left-color: #e9b21c; }
.ty-article .note p:last-child, .ty-article .tip p:last-child { margin-bottom: 0; }
.ty-table { overflow-x: auto; margin: 0 0 22px; border-radius: 14px; border: 1.5px solid var(--line); }
.ty-table table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.ty-table th, .ty-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ty-table th { background: var(--blush); font-weight: 700; }
.ty-table tr:last-child td { border-bottom: 0; }
.ty-table caption { caption-side: top; text-align: left; padding: 10px 14px 0; font-weight: 600; }

.ty-faq { margin: 10px 0 40px; }
.ty-faq details { border-bottom: 1.5px solid var(--line); }
.ty-faq summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 0; position: relative; font: 600 1.08rem/1.4 var(--sans); }
.ty-faq summary::-webkit-details-marker { display: none; }
.ty-faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--blush-2) linear-gradient(var(--coral-d), var(--coral-d)) center / 10px 2px no-repeat; }
.ty-faq summary::before { content: ""; position: absolute; right: 16px; top: 50%; width: 2px; height: 10px; margin-top: -5px; background: var(--coral-d); z-index: 1; transition: transform .2s ease; }
.ty-faq details[open] summary::before { transform: scaleY(0); }
.ty-faq-a { padding: 0 0 12px; color: var(--ink-2); }

.ty-ad { margin: 0 0 40px; text-align: center; }

/* rail beside the article on wide screens */
.ty-rail-box .ty-toc { margin: 0; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px 12px 12px 16px; }
.ty-rail-box .ty-toc ol { display: block; overflow: visible; max-height: 56vh; overflow-y: auto; padding: 0 4px 0 0; }
.ty-rail-box .ty-toc li { margin: 0 0 2px; }
.ty-rail-box .ty-toc a { white-space: normal; border: 0; border-radius: 10px; padding: 6px 10px; font-size: .92rem; line-height: 1.35; }
.ty-rail-cta { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; margin-top: 16px; padding: 16px 18px; border-radius: var(--r); background: var(--ink); color: #fff; text-decoration: none; }
.ty-rail-cta:hover { color: #fff; background: #3c2443; }
.ty-rail-cta .ty-ico { grid-row: span 2; color: var(--butter); width: 26px; height: 26px; }
.ty-rail-cta b { font: 400 1.15rem/1.2 var(--serif); }
.ty-rail-cta span { font-size: .88rem; color: #e2d4df; line-height: 1.4; }

/* ---------------------------------------------------------- related, index */
.ty-related { margin: 20px 0 50px; }
.ty-related h2 { font-size: 1.8rem; margin: 0 0 18px; }
.ty-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.ty-related a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease; }
.ty-related a:hover { transform: translateY(-3px); color: var(--ink); }
.ty-related img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.ty-related b { font: 400 1.15rem/1.25 var(--serif); padding: 14px 16px 2px; }
.ty-related span { font-size: .86rem; color: var(--ink-3); padding: 0 16px 16px; }

.ty-indexes { padding: 30px 20px 60px; }
.ty-indexes-h { font-size: clamp(2rem, 3.4vw, 2.7rem); margin: 0 0 22px; }
.ty-indexes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ty-index { --st: var(--coral); background: #fff; border: 1.5px solid var(--line); border-radius: 22px; padding: 22px 22px 12px; box-shadow: var(--shadow); position: relative; overflow: hidden; scroll-margin-top: 16px; }
.ty-index::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--st); }
.ty-index-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.ty-index h2 { font-size: 1.45rem; margin: 0; }
.ty-index h2 small { font: 600 .85rem/1 var(--sans); color: #fff; background: var(--st); border-radius: 999px; padding: 3px 9px; vertical-align: middle; margin-left: 6px; }
.ty-filter { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-3); }
.ty-filter input { border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; width: 190px; max-width: 100%; font-size: .92rem; }
.ty-chips { list-style: none; margin: 0; padding: 0; }
.ty-chips li { border-top: 1px dashed var(--line); }
.ty-chips a { display: flex; flex-direction: column; padding: 10px 2px; text-decoration: none; color: var(--ink); }
.ty-chips a:hover b { color: var(--coral-d); }
.ty-chips b { font-weight: 600; }
.ty-chips span { font-size: .9rem; color: var(--ink-3); line-height: 1.4; }
.ty-index-none { color: var(--ink-3); font-size: .92rem; }
.ty-indexes--one { padding-top: 0; }

.ty-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ty-tile a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.ty-tile-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--blush); }
.ty-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.ty-tile-badge { position: absolute; left: 10px; top: 10px; background: var(--butter); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; }
.ty-tile-body { display: flex; flex-direction: column; padding: 12px 14px 14px; }
.ty-tile-name { font: 400 1.1rem/1.25 var(--serif); }
.ty-tile-meta { font-size: .85rem; color: var(--ink-3); }
.ty-guides { margin: 40px 0; }
.ty-guides-h { font: 400 1.5rem/1.2 var(--serif); margin: 0 0 14px; }

.ty-latest { padding: 0 20px 60px; }
.ty-latest h2 { font-size: 1.8rem; margin: 0 0 14px; }
.ty-latest ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ty-latest a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 16px; background: var(--blush); text-decoration: none; color: var(--ink); }
.ty-latest a:hover { background: var(--blush-2); color: var(--ink); }
.ty-latest b { font-weight: 600; line-height: 1.35; }
.ty-latest small { color: var(--ink-3); }
.ty-latest-more { font-weight: 600; }

/* ------------------------------------------------------- blog list and posts */
.ty-list-title { padding: 40px 0 10px; }
.ty-list-title h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.ty-postlist { display: grid; gap: 14px; padding: 10px 0 30px; }
.ty-postrow { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px 22px; box-shadow: var(--shadow); }
.ty-postrow h2 { font-size: 1.4rem; margin: 0 0 4px; }
.ty-postrow h2 a { color: var(--ink); text-decoration: none; }
.ty-postrow h2 a:hover { color: var(--coral-d); }
.ty-postrow p { margin: 0; color: var(--ink-2); }
.ty-date { font-size: .88rem; color: var(--ink-3) !important; margin-bottom: 6px !important; }
.ty-pager { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 50px; }
.ty-pager a, .ty-pager span { padding: 7px 13px; border-radius: 10px; border: 1.5px solid var(--line); text-decoration: none; }
.ty-pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.ty-standfirst--date { font-size: .95rem; }
.ty-article--post img { border-radius: 14px; margin: 12px 0; }
.ty-article--post figure { margin: 0 0 18px; }
.ty-article--post h2 { margin-top: 32px; }

/* --------------------------------------------------------- footer (envelope back) */
.ty-foot { position: relative; margin-top: 30px; background: #ffe9e2; padding: 0 0 26px; }
.ty-foot-flap { position: relative; height: 92px; background: #f8cfc2; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.ty-foot .ty-seal { position: absolute; top: 56px; z-index: 2; left: 50%; width: 76px; height: 76px; margin-left: -38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f07a63, var(--coral-d)); box-shadow: 0 8px 18px -8px rgba(120, 30, 18, .7), inset 0 0 0 5px rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; }
.ty-foot .ty-seal img { width: 40px; height: 40px; filter: saturate(.2) brightness(2.2); }
.ty-foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; padding: 64px 0 30px; }
.ty-foot-sign { font: 400 2rem/1 var(--hand); color: var(--coral-d); margin: 0 0 8px; }
.ty-logo--foot { color: var(--ink); margin: 0 0 12px; font-size: 1.6rem; }
.ty-logo--foot em { color: var(--coral-d); }
.ty-foot-brand p:last-child { color: var(--ink-2); max-width: 30em; margin: 0; }
.ty-foot-stamps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.ty-foot-stamps a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border: 1.5px dashed color-mix(in srgb, var(--st) 50%, #fff); }
.ty-foot-stamps a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--st); }
.ty-foot-stamps a:hover { background: var(--ink); color: #fff; }
.ty-foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 18px; border-top: 1.5px solid rgba(42, 24, 48, .12); font-size: .9rem; color: var(--ink-2); }
.ty-foot-legal a { color: var(--ink-2); text-decoration: none; }
.ty-foot-legal a:hover { color: var(--coral-d); text-decoration: underline; }
.ty-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5); font-weight: 500; max-width: calc(100% - 32px); }

/* ------------------------------------------------------------------ widths */
@media (min-width: 760px) {
	.ty-article ul.msgs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1120px) {
	.ty-read--rail { grid-template-columns: minmax(0, 1fr) 290px; gap: 54px; }
	.ty-rail { display: block; }
	.ty-rail > * { position: sticky; top: 20px; }
	.ty-rail-box { position: sticky; top: 20px; }
	.ty-rail-cta { position: static; }
}
@media (max-width: 1180px) {
	.ty-stamps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
	.ty-nav { display: none; }
	.ty-cta { margin-left: auto; }
	.ty-menubtn { display: inline-flex; }
}
@media (max-width: 900px) {
	.ty-hero { padding-top: 34px; }
	.ty-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.ty-envelope { max-width: 440px; }
	.ty-head-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.ty-head-fig { max-width: 360px; }
	.ty-nb { grid-template-columns: minmax(0, 1fr); padding: 20px; }
	.ty-indexes-grid { grid-template-columns: minmax(0, 1fr); }
	.ty-foot-top { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
	body { font-size: 1.02rem; }
	.ty-mast-row { min-height: 64px; gap: 10px; }
	.ty-logo { font-size: 1.15rem; gap: 8px; }
	.ty-logo img { width: 32px; height: 32px; }
	.ty-logo em { font-size: 1.22rem; }
	.ty-cta { padding: 9px 12px; }
	.ty-cta span { display: none; }
	.ty-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.ty-stamps li a { min-height: 112px; }
	.ty-env-card { padding: 18px 18px; }
	.ty-env-to { font-size: 1.2rem; }
	.ty-env-line { font-size: 1.05rem; line-height: 28px; }
	.ty-env-card { background-image: repeating-linear-gradient(transparent 0 27px, rgba(47, 111, 219, .1) 27px 28px); }
	.ty-env-from { font-size: 1.1rem; }
	.ty-env-post { display: none; }
	.ty-nb-fields { grid-template-columns: minmax(0, 1fr); }
	.ty-builder-band { padding: 40px 0; }
	.ty-article .sample { padding: 18px 18px 12px; }
	.ty-foot-flap { height: 64px; }
	.ty-foot .ty-seal { top: 34px; width: 64px; height: 64px; margin-left: -32px; }
	.ty-foot .ty-seal img { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
