/* Components: buttons, cards, chips, eyebrow, meta. */

/* Eyebrow — cyan shear-tick + confident label (sentence case, not all-caps). */
.tr-eyebrow{display:inline-flex;align-items:center;font-family:var(--fmono);
  font-size:.8rem;font-weight:500;letter-spacing:.02em;color:var(--slate)}

/* Buttons */
.tr-btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--fdisplay);
  font-weight:600;font-size:1rem;line-height:1;padding:.85rem 1.3rem;border-radius:10px;
  border:1px solid transparent;cursor:pointer;transition:transform .12s ease,background .15s ease}
.tr-btn:hover{text-decoration:none;transform:translateY(-1px)}
.tr-btn--primary{background:var(--navy);color:#fff}
.tr-btn--primary:hover{background:var(--navy-900)}
.tr-btn--accent{background:var(--cyan);color:var(--on-accent)}
.tr-btn--accent:hover{background:#0bb0c4}
.tr-btn--ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.tr-btn--ghost:hover{border-color:var(--navy);background:var(--surface)}

/* Mono metadata chips — genuinely technical data (category, read time, level). */
.tr-chip{display:inline-flex;align-items:center;font-family:var(--fmono);font-size:.78rem;
  font-weight:500;color:var(--cyan-ink);background:var(--cyan-50);
  padding:.22rem .55rem;border-radius:6px}
:root[data-theme="dark"] .tr-chip{background:rgba(13,194,216,.12);color:#5fdfee}
.tr-meta{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;
  font-family:var(--fmono);font-size:.82rem;color:var(--slate)}

/* Cards (used sparingly — not a card grid everywhere) */
.tr-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:1.4rem;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:.6rem;height:100%}
.tr-card h3{margin:0}
.tr-card__excerpt{color:var(--slate);margin:0}
.tr-card a.tr-card__title{color:var(--ink)}
.tr-card a.tr-card__title:hover{color:var(--cyan-ink);text-decoration:none}

/* Simple responsive grid helper */
.tr-grid{display:grid;gap:1.4rem}
@media (min-width:640px){.tr-grid--2{grid-template-columns:repeat(2,1fr)}
  .tr-grid--3{grid-template-columns:repeat(3,1fr)}}
@media (min-width:960px){.tr-grid--4{grid-template-columns:repeat(4,1fr)}}

/* ---- Header ---- */
/* Blur lives on ::before: backdrop-filter on .tr-header itself would become the containing
   block of the fixed mobile nav and pin it over the header. */
.tr-header{position:sticky;top:0;z-index:100;border-bottom:1px solid var(--header-line)}
.tr-header::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--header-bg);
  backdrop-filter:saturate(1.3) blur(10px);-webkit-backdrop-filter:saturate(1.3) blur(10px)}
.tr-header__inner{display:flex;align-items:center;gap:1.5rem;min-height:68px}
.tr-logo__img,.custom-logo{height:36px;width:auto}
.tr-logo{display:inline-flex;align-items:center}
.tr-logo__img--light{display:none}
:root[data-theme="dark"] .tr-logo__img--dark{display:none}
:root[data-theme="dark"] .tr-logo__img--light{display:inline-block}
.tr-logo{font-family:var(--fdisplay);font-weight:800;font-size:1.25rem;color:var(--ink)}
.tr-header__brand{margin-right:auto}
.tr-nav{display:flex;align-items:center;gap:1.5rem}
.tr-nav__list{display:flex;align-items:center;gap:1.4rem;list-style:none;margin:0;padding:0}
.tr-nav__list a{font-family:var(--fdisplay);font-weight:600;font-size:.98rem;color:var(--ink)}
.tr-nav__list a:hover{color:var(--cyan-ink);text-decoration:none}
.tr-nav__list .current-menu-item>a{box-shadow:inset 0 -2px 0 var(--cyan)}
.tr-header__actions{display:flex;align-items:center;gap:.9rem}
.tr-langs ul{display:flex;gap:.5rem;list-style:none;margin:0;padding:0;font-family:var(--fmono);font-size:.8rem}
.tr-langs a{color:var(--slate)}.tr-langs .current-lang a{color:var(--ink);font-weight:600}
.tr-theme-toggle{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);
  background:var(--surface);border-radius:9px;cursor:pointer}
.tr-theme-toggle__icon{width:16px;height:16px;border-radius:50%;
  background:var(--navy);box-shadow:inset -4px -4px 0 0 var(--cyan)}
:root[data-theme="dark"] .tr-theme-toggle__icon{background:#fff;box-shadow:inset -4px -4px 0 0 var(--cyan)}
.tr-nav-toggle{display:none;flex-direction:column;gap:4px;width:42px;height:42px;
  justify-content:center;align-items:center;background:transparent;border:1px solid var(--line);
  border-radius:9px;cursor:pointer}
.tr-nav-toggle span{display:block;width:20px;height:2px;background:var(--ink)}
@media (max-width:860px){
  .tr-nav-toggle{display:flex}
  .tr-nav{position:fixed;inset:68px 0 auto 0;flex-direction:column;align-items:stretch;
    gap:0;background:var(--surface);border-bottom:1px solid var(--line);padding:1rem clamp(1rem,5vw,3rem);
    transform:translateY(calc(-100% - 68px));visibility:hidden;transition:transform .2s ease,visibility 0s linear .2s;
    box-shadow:var(--shadow)}
  .tr-nav.is-open{transform:translateY(0);visibility:visible;transition:transform .2s ease}
  .tr-nav__list{flex-direction:column;align-items:flex-start;gap:.2rem;width:100%}
  .tr-nav__list a{display:block;padding:.6rem 0;width:100%}
  .tr-header__actions{margin-top:.8rem;padding-top:.8rem;border-top:1px solid var(--line);width:100%}
}

/* ---- Footer ---- */
.tr-footer{background:var(--navy-900);color:#C7D3DE;margin-top:clamp(3rem,6vw,6rem);
  padding-top:clamp(3.4rem,5vw,5rem)}
.tr-footer__inner{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:2rem;
  padding-bottom:2.5rem}
.tr-footer__logo{height:34px;width:auto}
.tr-footer__claim{font-family:var(--fdisplay);font-weight:600;color:#fff;margin:.9rem 0 0;max-width:22ch}
.tr-footer__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.55rem}
.tr-footer__list a{color:#C7D3DE;font-size:.95rem}
.tr-footer__list a:hover{color:var(--cyan);text-decoration:none}
.tr-footer__bottom{border-top:1px solid var(--navy-700);padding-block:1.3rem;
  font-family:var(--fmono);font-size:.8rem;color:#8EA2B4}
.tr-footer__bottom{display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;justify-content:space-between;align-items:center}
.tr-footer__bottom p{margin:0}
.tr-footer__legal{display:flex;gap:1.2rem;list-style:none;margin:0;padding:0}
.tr-footer__legal a{color:inherit}
.tr-footer__legal a:hover,.tr-footer__legal a:focus-visible{color:var(--cyan)}
@media (max-width:860px){.tr-footer__inner{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.tr-footer__inner{grid-template-columns:1fr}}

/* ---- Hero ---- */
.tr-hero{background:
    radial-gradient(120% 80% at 85% -10%, rgba(13,194,216,.10), transparent 60%),
    var(--bg);
  padding-block:clamp(3rem,3rem + 4vw,6.5rem)}
.tr-hero__grid{display:grid;grid-template-columns:1.25fr .85fr;gap:clamp(2rem,5vw,4rem);align-items:center}
.tr-hero__title{font-family:var(--fdisplay);font-weight:800;letter-spacing:-.025em;
  font-size:clamp(2.6rem,1.6rem + 4vw,4.6rem);line-height:1.02;margin:.6rem 0 1rem;text-wrap:balance}
.tr-hero__sub{font-size:clamp(1.1rem,1rem + .6vw,1.3rem);color:var(--slate);max-width:46ch;margin-bottom:1.6rem}
.tr-hero__actions{display:flex;flex-wrap:wrap;gap:.8rem}
.tr-hero__panel{background:linear-gradient(145deg,var(--navy),var(--navy-900));
  border-radius:var(--radius);padding:clamp(2rem,4vw,3.4rem);display:grid;place-items:center;
  min-height:240px;position:relative;overflow:hidden}
.tr-hero__panel::after{content:"";position:absolute;left:0;bottom:0;width:100%;height:46%;
  background:var(--cyan);opacity:.14;transform:skewY(var(--shear)) translateY(40%)}
.tr-hero__mark{width:min(62%,240px);height:auto;position:relative;filter:drop-shadow(0 12px 30px rgba(0,0,0,.35))}
@media (max-width:820px){.tr-hero__grid{grid-template-columns:1fr}.tr-hero__panel{order:-1;min-height:180px}}

/* ---- Principle: Understand / Decide / Act (a real sequence) ---- */
.tr-principle__steps{list-style:none;margin:1.4rem 0 0;padding:0;display:grid;gap:1.4rem;
  grid-template-columns:repeat(3,1fr);counter-reset:none}
.tr-principle__steps li{border-top:2px solid var(--line);padding-top:1rem}
.tr-principle__n{font-family:var(--fmono);font-size:.9rem;color:var(--cyan-ink)}
.tr-principle__steps h3{margin:.4rem 0 .3rem}
.tr-principle__steps p{color:var(--slate);margin:0}
@media (max-width:760px){.tr-principle__steps{grid-template-columns:1fr}}

/* ---- Newsletter ---- */
.tr-newsletter{background:var(--navy);color:#fff;margin-top:clamp(3rem,5vw,5rem)}
.tr-newsletter__inner{display:grid;grid-template-columns:1.2fr .8fr;gap:2rem;align-items:center;
  padding-block:clamp(2.6rem,4vw,4rem)}
.tr-newsletter h2{color:#fff;margin:.4rem 0 .5rem}
.tr-newsletter__sub{color:#B9C7D4;margin:0;max-width:40ch}
.tr-newsletter .tr-eyebrow{color:#9DB1C2}
.tr-newsletter__form{display:flex;justify-content:flex-end}
@media (max-width:760px){.tr-newsletter__inner{grid-template-columns:1fr}.tr-newsletter__form{justify-content:flex-start}}


/* ---- Reading progress ---- */
.tr-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:200;background:transparent}
.tr-progress span{display:block;height:100%;background:var(--cyan);transform:scaleX(0);
  transform-origin:0 50%;transition:transform .05s linear}

/* ---- Article ---- */
.tr-article{padding-top:clamp(2rem,2rem + 3vw,4rem)}
.tr-article__head{max-width:820px}
.tr-article__title{font-size:clamp(2rem,1.4rem + 3vw,3.4rem);line-height:1.05;margin:.5rem 0 1rem}
.tr-article__meta{margin-bottom:1.5rem}
.tr-article__hero{margin:1.5rem auto 0;max-width:1000px}
.tr-article__img{width:100%;height:auto;border-radius:var(--radius)}
.tr-article__body{margin-top:2rem}
.tr-prose{max-width:var(--measure);font-size:1.15rem;line-height:1.75}
.tr-prose>*{margin-left:auto;margin-right:auto}
.tr-prose p,.tr-prose ul,.tr-prose ol,.tr-prose blockquote,.tr-prose h2,.tr-prose h3,.tr-prose figure{max-width:var(--measure)}
.tr-prose h2{margin-top:2.2rem}.tr-prose h3{margin-top:1.6rem}
.tr-prose blockquote{border-left:3px solid var(--cyan);padding-left:1.2rem;margin-inline:0;
  color:var(--slate);font-style:italic}
.tr-prose img{border-radius:var(--radius)}
.tr-prose a{box-shadow:inset 0 -1px 0 currentColor}
.tr-prose code{font-family:var(--fmono);font-size:.9em;background:var(--surface-2);padding:.1em .35em;border-radius:5px}
.tr-prose pre{background:var(--navy-900);color:#E7EEF4;padding:1.1rem;border-radius:var(--radius);overflow:auto}
.tr-prose pre code{background:none;padding:0;color:inherit}

/* ---- Archive / filter / pagination / search / 404 ---- */
.tr-archive__head{padding-bottom:0}
.tr-archive__desc{color:var(--slate);margin-top:.6rem}
.tr-filter{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.3rem}
.tr-filter__item{font-family:var(--fmono);font-size:.82rem;color:var(--slate);
  border:1px solid var(--line);border-radius:999px;padding:.35rem .85rem;background:var(--surface)}
.tr-filter__item:hover{border-color:var(--navy);color:var(--ink);text-decoration:none}
.tr-filter__item.is-active{background:var(--navy);color:#fff;border-color:var(--navy)}
.tr-archive__list{padding-top:clamp(1.5rem,3vw,2.5rem)}
.tr-pagination{display:flex;gap:.4rem;justify-content:center;margin-top:2.5rem}
.tr-pagination .page-numbers{display:grid;place-items:center;min-width:42px;height:42px;padding:0 .4rem;
  border:1px solid var(--line);border-radius:9px;font-family:var(--fmono);font-size:.9rem;color:var(--ink)}
.tr-pagination .current{background:var(--navy);color:#fff;border-color:var(--navy)}
.tr-pagination a.page-numbers:hover{border-color:var(--navy);text-decoration:none}
.tr-search{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1.2rem;max-width:620px}
.tr-search__label{position:absolute;left:-9999px}
.tr-search__input{flex:1 1 240px;padding:.8rem 1rem;border:1px solid var(--line);border-radius:10px;
  background:var(--surface);color:var(--ink);font:inherit}
.tr-search__input:focus{outline:3px solid var(--cyan);outline-offset:1px}
.tr-404 h1{font-size:clamp(2rem,1.5rem + 3vw,3.2rem)}
.tr-404__sub{color:var(--slate);font-size:1.15rem;margin-bottom:1rem}
.tr-404__links{list-style:none;padding:0;margin:1.4rem 0 0;display:flex;flex-wrap:wrap;gap:1.2rem;font-family:var(--fdisplay);font-weight:600}

/* ---- Role & Resource ---- */
.tr-role__head,.tr-resource__head{padding-bottom:0}
.tr-role__summary,.tr-resource__benefit{font-size:1.2rem;color:var(--slate);margin-top:.6rem}
.tr-role__grid,.tr-resource__grid{display:grid;grid-template-columns:1fr 320px;gap:clamp(1.5rem,4vw,3rem);
  margin-top:2rem;align-items:start}
.tr-role__main{max-width:none}
.tr-role__main.tr-prose>*{max-width:var(--measure)}
.tr-role__aside,.tr-resource__aside{position:sticky;top:90px;display:flex;flex-direction:column;gap:1.2rem}
.tr-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1.3rem}
.tr-panel h3{margin:0 0 .7rem;font-size:1.05rem}
.tr-panel ul{margin:0;padding-left:1.1rem;display:flex;flex-direction:column;gap:.4rem;color:var(--slate)}
.tr-tags{list-style:none;padding:0;flex-direction:row;flex-wrap:wrap;gap:.45rem}
.tr-panel--download{background:var(--navy);color:#fff;display:flex;flex-direction:column;gap:.9rem}
.tr-panel--download .tr-btn{width:100%;justify-content:center}
.tr-kv{margin:0;display:flex;flex-direction:column;gap:.15rem}
.tr-kv span{font-family:var(--fmono);font-size:.74rem;color:#9DB1C2}
.tr-card--role,.tr-card--resource{text-decoration:none;color:inherit}
.tr-card--role:hover,.tr-card--resource:hover{border-color:var(--cyan);text-decoration:none}
@media (max-width:860px){.tr-role__grid,.tr-resource__grid{grid-template-columns:1fr}
  .tr-role__aside,.tr-resource__aside{position:static}}

/* ---- Default page ---- */
.tr-page{padding-top:clamp(2rem,2rem + 3vw,4rem)}
.tr-page__body{margin-top:0}
.tr-page .tr-prose{font-size:1.1rem}
/* full-width blocks (patterns) break out of the prose measure */
.tr-page .tr-prose .alignwide,.tr-page .tr-prose .alignfull{max-width:none;width:auto}
.tr-page .tr-prose .wp-block-group.alignfull{margin-inline:calc(50% - 50vw);padding-inline:clamp(1rem,5vw,3rem)}
