/* frankfamilyoffice.com */
:root {
  --paper: #FBFBF8;
  --panel: #F1F4F1;
  --ink: #15201C;
  --muted: #56635D;
  --line: #D5DCD7;
  --jade: #133F35;
  --jade-hover: #1D5A4B;
  --jade-soft: #E4ECE7;
  --brass: #A27B3F;

  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;

  --step-0: 1.0625rem;   /* 17px body */
  --step-1: 1.25rem;     /* 20px */
  --step-2: 1.5rem;      /* 24px */
  --step-3: 2rem;        /* 32px */
  --wrap: 72rem;
  --measure: 40em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--jade); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--jade-hover); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--jade); line-height: 1.35; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 1em; }
mark.todo { background: #FBE7A1; color: var(--ink); padding: 0 .2em; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--jade); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.25rem;
  background: var(--jade); color: #fff; border: 1px solid var(--jade); border-radius: 6px;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--jade-hover); border-color: var(--jade-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--jade); }
.btn-ghost:hover { background: var(--jade-soft); color: var(--jade); }
.btn-small { min-height: 2.25rem; padding: 0 .9rem; font-size: .9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; color: var(--jade); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.375rem; letter-spacing: .02em; }
.brand-sub { font-size: .9375rem; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .9375rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--jade); text-decoration: underline; }

/* hero */
.hero { padding: 4.5rem 0 4rem; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
.hero-title { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.5rem); line-height: 1.28; letter-spacing: .03em; }
.hero-lead { margin-top: 1.75rem; font-size: var(--step-1); line-height: 1.8; color: var(--ink); max-width: 30em; }
.portrait { margin: 0; justify-self: end; width: 100%; max-width: 22rem; }
.portrait img, .portrait-empty { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: 4px; }
.portrait-empty { background: var(--jade-soft); display: grid; place-items: center; color: var(--muted); font-size: .9375rem; border: 1px dashed #B9C7BE; }
.portrait figcaption { margin-top: .6rem; font-size: .875rem; color: var(--muted); }

/* section shared */
.section-title { font-size: var(--step-3); }
.section-lead { margin-top: 1rem; max-width: var(--measure); color: var(--ink); }
.note { margin-top: 1.5rem; font-size: .875rem; color: var(--muted); max-width: var(--measure); }

/* the three schemes */
.schemes { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.scheme-list { margin-top: 2.5rem; border-bottom: 1px solid var(--line); }
.scheme {
  display: grid; grid-template-columns: 19rem minmax(0, 1fr) 9rem; gap: 2rem; align-items: start;
  padding: 1.75rem 0; border-top: 1px solid var(--line);
}
.scheme-head { display: flex; flex-direction: column; gap: .55rem; }
.scheme-code { font-size: 3.25rem; line-height: 1; letter-spacing: .01em; }
.scheme-code .sect { color: var(--brass); font-size: .6em; margin-right: .12em; vertical-align: .22em; }
.scheme-name { font-size: var(--step-1); line-height: 1.4; }
.scheme-body p { margin: 0; max-width: 34em; padding-top: .35rem; }
.scheme-link { padding-top: .35rem; }
.scheme-link { text-align: right; font-weight: 600; }

/* services */
.services { padding: 4.5rem 0; background: var(--panel); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 2.25rem; }
.service { border-top: 2px solid var(--jade); padding-top: 1.1rem; }
.service h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.service p { margin: 0; }

/* article list */
.latest { padding: 4.5rem 0; }
.article-list { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.article-item { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.75rem; align-items: start; text-decoration: none; color: var(--ink); }
.thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.article-meta { display: flex; flex-direction: column; gap: .35rem; }
.article-title { font-family: var(--serif); font-weight: 700; font-size: var(--step-1); color: var(--jade); line-height: 1.45; }
.article-item:hover .article-title { text-decoration: underline; text-underline-offset: .2em; }
.article-sub { max-width: 36em; }
.article-date { font-size: .875rem; color: var(--muted); }

/* contact */
.contact { padding: 4.5rem 0 5rem; background: var(--jade-soft); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 3.5rem; }
.prep { margin: 0 0 1rem; padding-left: 1.2em; }
.prep li { margin: .25rem 0; }
.contact-note { color: var(--muted); font-size: .9375rem; }
.contact-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; align-content: start; }
.way h3 { font-family: var(--sans); font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: .5rem; }
.way-value { font-size: 1.0625rem; font-weight: 600; color: var(--ink); margin-bottom: .9rem; overflow-wrap: anywhere; }
.way-value a { color: var(--ink); }
.way-email { font-size: 1rem; }
.qr { width: 10rem; height: 10rem; border-radius: 4px; background: #fff; margin-bottom: .75rem; }
.qr-empty { display: grid; place-items: center; font-size: .875rem; color: var(--muted); border: 1px dashed #B9C7BE; }
.copy[data-done] { background: var(--jade); color: #fff; }

/* plain pages */
.page { padding: 4rem 0 3.5rem; }
.page h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem); }
.page-lead { margin-top: 1.25rem; font-size: var(--step-1); max-width: 34em; }
.page h2 { font-size: var(--step-2); margin: 2.75rem 0 1rem; }
.about-inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.portrait-about { margin-top: .5rem; }
.principles { margin: 0; max-width: var(--measure); }
.principles dt { font-weight: 700; color: var(--ink); margin-top: 1.1rem; }
.principles dd { margin: .2rem 0 0; }
.plain-list { padding-left: 1.2em; margin: 0; }

/* article */
.post { padding: 2rem 0 3rem; }
.post-wrap { max-width: calc(var(--measure) + 3rem); }
.crumbs { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.crumbs a { color: var(--muted); }
.post-head h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 2.875rem); line-height: 1.3; }
.post-sub { font-family: var(--serif); font-size: var(--step-1); color: var(--ink); margin: .75rem 0 0; }
.byline { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin: 1.25rem 0 0; font-size: .9375rem; color: var(--muted); }
.answer { margin: 2.25rem 0 0; padding: 1.25rem 1.5rem; background: var(--jade-soft); border-left: 3px solid var(--jade); border-radius: 0 4px 4px 0; }
.answer p { margin: 0; }
.answer strong { color: var(--jade); }

.video { margin: 2.25rem 0 0; }
.video-facade, .video iframe, .video-empty { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: var(--jade); }
.video-facade { position: relative; padding: 0; cursor: pointer; overflow: hidden; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade .play { position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; border-radius: 50%; background: rgba(19, 63, 53, .88); }
.video-facade .play::after { content: ""; position: absolute; left: 1.8rem; top: 1.35rem; border-style: solid; border-width: .9rem 0 .9rem 1.5rem; border-color: transparent transparent transparent #fff; }
.video-facade:hover .play { background: var(--brass); }
.video-empty { display: grid; place-items: center; color: #D7E3DC; font-size: .9375rem; }
.video figcaption { margin-top: .6rem; font-size: .875rem; color: var(--muted); }

.prose { margin-top: 2.5rem; }
.prose > p, .prose li { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin: 3rem 0 1rem; }
.prose h3 { font-size: var(--step-1); margin: 2rem 0 .6rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .45rem 0; }
.prose sup { font-size: .7em; line-height: 0; margin-left: .1em; }
.prose sup a { text-decoration: none; }
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1rem; max-width: var(--measure); }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: .65rem .9rem .65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { font-size: .875rem; color: var(--muted); font-weight: 600; border-bottom-color: var(--jade); }
.prose tbody th { font-family: var(--serif); color: var(--jade); font-size: 1.125rem; white-space: nowrap; }
.figure { margin: 2rem 0; }
.figure img { width: 100%; max-width: 34rem; border: 1px solid var(--line); border-radius: 4px; }
.figure figcaption { margin-top: .6rem; font-size: .875rem; color: var(--muted); }
.post-end { font-size: .9375rem; color: var(--muted); margin-top: 2rem; }
.sources { font-size: .9375rem; color: var(--muted); }
.sources a { overflow-wrap: anywhere; }
.sources li:target { background: #FBE7A1; }
.related { margin-top: 3rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 4px; max-width: var(--measure); }
.related-label { margin: 0 0 .25rem; font-size: .875rem; color: var(--muted); }
.related a { font-family: var(--serif); font-weight: 700; font-size: var(--step-1); line-height: 1.45; }
.author { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: var(--measure); }
.author-name { font-family: var(--serif); font-weight: 700; color: var(--jade); font-size: var(--step-1); margin-bottom: .3rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: .9375rem; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; }
.footer-name { font-family: var(--serif); font-weight: 700; color: var(--jade); margin-bottom: .2rem; }
.footer-id p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: start; }
.footer-links a { color: var(--muted); }
.footer-legal { grid-column: 1 / -1; margin: 1rem 0 0; font-size: .8125rem; }

/* mobile contact bar */
.contact-bar { display: none; }

@media (max-width: 960px) {
  .hero-inner, .about-inner, .contact-inner { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .portrait { justify-self: start; max-width: 16rem; }
  .contact-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scheme { grid-template-columns: 15rem minmax(0, 1fr); }
  .scheme-link { grid-column: 2; text-align: left; padding-top: 0; }
}

@media (max-width: 720px) {
  body { font-size: 1rem; line-height: 1.8; padding-bottom: 4.5rem; }
  .wrap { padding: 0 1rem; }
  .header-inner { min-height: 3.5rem; }
  .brand-sub { display: none; }
  .nav { gap: 1.1rem; }
  .nav .btn { display: none; }
  .hero { padding: 2.5rem 0 3rem; }
  .hero-lead { font-size: 1.0625rem; }
  .actions { display: none; }
  .portrait { max-width: 11rem; }
  .portrait-about { max-width: 14rem; }
  .schemes, .services, .latest, .contact { padding: 3rem 0; }
  .section-title { font-size: 1.625rem; }
  .scheme { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding: 1.5rem 0; }
  .scheme-code { font-size: 2.5rem; }
  .scheme-link { grid-column: 1; }
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .article-item { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; }
  .contact-ways { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .answer { padding: 1rem 1.1rem; }
  .contact-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--line);
  }
  .contact-bar .btn-ghost { background: var(--paper); }
}

@media print {
  .site-header, .contact-bar, .contact, .video { display: none; }
}
