/*
 * PDF Hanko — the product site of an offline PDF app: stamp, sign, fill in and
 * scan, all on the phone.
 *
 * The app's own design decides this file:
 *
 *   - The accent is 朱 (#D7261E), the app's default stamp ink. Everything a
 *     visitor can press is that red, and so is every seal drawn on the page.
 *   - The app's home tiles keep their colours inside the drawn phone — blue open,
 *     navy scan, red stamp, purple sign — and are not borrowed outside it.
 *   - Gold is the app's 👑 and marks Pro. Nothing else on the page is gold.
 *   - The page is paper: a warm off-white with hairline rules, so a red seal on
 *     it reads the way one reads on a contract. The hero and the closing band
 *     carry a faint 原稿用紙 grid — manuscript paper — in the seal's red.
 *
 * No web font is loaded, on purpose: a site that promises nothing leaves your
 * phone should not open with a request to a font CDN. The stacks below reach
 * each platform's own Japanese faces (Hiragino, Yu Gothic, Noto Sans JP).
 */

/* -------------------------------------------------------------------------
 * Colour modes — three blocks, and the order is the mechanism.
 *
 *   1. `:root`                      — LIGHT, the base.
 *   2. `prefers-color-scheme: dark` — the OS, honoured while the visitor has
 *                                     not explicitly chosen light.
 *   3. `[data-theme="dark"]`        — an explicit choice, which beats the OS.
 *
 * The dark tokens are written twice, in 2 and 3. Keep the two lists identical —
 * build.mjs refuses to build when they drift.
 * ---------------------------------------------------------------------- */

:root {
  --ph-accent: #d7261e;
  --ph-accent-2: #e8483e;
  --ph-on-accent: #ffffff;

  --ph-radius: 16px;
  --ph-radius-sm: 12px;
  --ph-radius-lg: 22px;
  --ph-pill: 999px;

  --ph-header-h: 62px;
  --ph-band: clamp(52px, 5.6vw, 92px);
  --ph-band-sm: clamp(28px, 3vw, 44px);
  --ph-head-gap: clamp(26px, 3vw, 40px);
  --ph-doc-gap: 38px;

  --ph-font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, "Segoe UI", Roboto, sans-serif;
  --ph-seal-font: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP",
    "MS PMincho", serif;

  /* Colours that do not change with the mode: the app's own. */
  --ph-blue: #1e6ff1;
  --ph-navy: #1f3f99;
  --ph-purple: #7650d8;
  --ph-shu: #d7261e;

  --ph-bg: #faf7f2;
  --ph-surface: #fffdf9;
  --ph-panel: #ffffff;
  --ph-panel-2: #f3eee6;
  --ph-tint: #f5f0e8;
  --ph-paper: #fffdf8;
  --ph-line: #e8e0d4;
  --ph-ink: #1d1a17;
  --ph-muted: #6b6259;
  --ph-shadow: 0 24px 56px -18px rgba(60, 36, 20, 0.28);
  --ph-shadow-sm: 0 6px 18px -6px rgba(60, 36, 20, 0.18);
  --ph-card-shadow: 0 1px 0 rgba(60, 36, 20, 0.04), 0 10px 26px -18px rgba(60, 36, 20, 0.35);
  --ph-medium: #c98a06;
  --ph-gold: #a86f00;
  --ph-gold-bg: #fbf0d4;
  --ph-free: #1b5fcf;
  --ph-free-bg: #e7effd;
  --ph-danger: #d7261e;
  --ph-accent-text: #b41e17;
  --ph-accent-soft: #fbe9e7;
  --ph-grid: rgba(215, 38, 30, 0.07);
  --ph-glow: rgba(215, 38, 30, 0.1);

  /* The drawn app, in the appearance the app itself uses in this mode. */
  --ph-app-bg: #ffffff;
  --ph-app-ink: #111114;
  --ph-app-muted: #8a8a90;
  --ph-app-label: #55555c;
  --ph-app-tool: #3a3a40;
  --ph-app-line: #e6e6ea;
  --ph-app-fill: #f1f1f4;
  --ph-app-card: #ffffff;
  --ph-app-seg-on: #ffffff;
  --ph-app-bar: rgba(255, 255, 255, 0.86);
  --ph-app-canvas: #e9e8ee;
  --ph-app-blue: #1e6ff1;
  --ph-app-blue-soft: #e8f0fe;
  --ph-app-tab-on: rgba(30, 111, 241, 0.1);
  --ph-app-red-soft: #fdeceb;
  --ph-app-found-bg: #fff5e0;
  --ph-app-found-ink: #7a5200;
  --ph-app-sig: #1b2a6b;

  /* The small flow pictures. */
  --ph-scene-plate: #f5f0e8;
  --ph-scene-paper: #ffffff;
  --ph-scene-edge: #e8e0d4;
  --ph-scene-bar: #e3ddd3;
  --ph-scene-bar-strong: #b9b0a4;
  --ph-scene-field: #f5f1ea;
  --ph-scene-ink: #1b2a6b;
}

/* ---- DARK, from the OS, while no explicit light choice is in force ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ph-bg: #14120f;
    --ph-surface: #1a1714;
    --ph-panel: #201d19;
    --ph-panel-2: #2a2621;
    --ph-tint: #181512;
    --ph-paper: #2a2621;
    --ph-line: #373029;
    --ph-ink: #f3eee7;
    --ph-muted: #aca295;
    --ph-shadow: 0 28px 64px -18px rgba(0, 0, 0, 0.7);
    --ph-shadow-sm: 0 8px 22px -6px rgba(0, 0, 0, 0.55);
    --ph-card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 28px -18px rgba(0, 0, 0, 0.8);
    --ph-medium: #f0bd4a;
    --ph-gold: #f2c55c;
    --ph-gold-bg: rgba(242, 197, 92, 0.14);
    --ph-free: #8db4ff;
    --ph-free-bg: rgba(91, 145, 255, 0.16);
    --ph-danger: #ff6b61;
    --ph-accent: #dc3128;
    --ph-accent-2: #ec5047;
    --ph-accent-text: #ff8d84;
    --ph-accent-soft: rgba(255, 106, 96, 0.14);
    --ph-grid: rgba(255, 120, 100, 0.06);
    --ph-glow: rgba(220, 49, 40, 0.16);
    --ph-app-bg: #111114;
    --ph-app-ink: #f2f2f5;
    --ph-app-muted: #8e8e96;
    --ph-app-label: #a4a4ac;
    --ph-app-tool: #d0d0d6;
    --ph-app-line: #2c2c31;
    --ph-app-fill: #1f1f24;
    --ph-app-card: #1c1c20;
    --ph-app-seg-on: #3a3a41;
    --ph-app-bar: rgba(44, 44, 50, 0.88);
    --ph-app-canvas: #050506;
    --ph-app-blue: #3d86ff;
    --ph-app-blue-soft: rgba(61, 134, 255, 0.2);
    --ph-app-tab-on: rgba(61, 134, 255, 0.2);
    --ph-app-red-soft: rgba(231, 60, 50, 0.24);
    --ph-app-found-bg: rgba(245, 180, 0, 0.14);
    --ph-app-found-ink: #f5c451;
    --ph-app-sig: #a9bcff;
    --ph-scene-plate: #221e1a;
    --ph-scene-paper: #312b25;
    --ph-scene-edge: #443c34;
    --ph-scene-bar: #4b433a;
    --ph-scene-bar-strong: #7a7064;
    --ph-scene-field: #2a2520;
    --ph-scene-ink: #a9bcff;
  }
}

/* ---- DARK, chosen by the visitor. Same list as above. ---- */
:root[data-theme="dark"] {
  --ph-bg: #14120f;
  --ph-surface: #1a1714;
  --ph-panel: #201d19;
  --ph-panel-2: #2a2621;
  --ph-tint: #181512;
  --ph-paper: #2a2621;
  --ph-line: #373029;
  --ph-ink: #f3eee7;
  --ph-muted: #aca295;
  --ph-shadow: 0 28px 64px -18px rgba(0, 0, 0, 0.7);
  --ph-shadow-sm: 0 8px 22px -6px rgba(0, 0, 0, 0.55);
  --ph-card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 28px -18px rgba(0, 0, 0, 0.8);
  --ph-medium: #f0bd4a;
  --ph-gold: #f2c55c;
  --ph-gold-bg: rgba(242, 197, 92, 0.14);
  --ph-free: #8db4ff;
  --ph-free-bg: rgba(91, 145, 255, 0.16);
  --ph-danger: #ff6b61;
  --ph-accent: #dc3128;
  --ph-accent-2: #ec5047;
  --ph-accent-text: #ff8d84;
  --ph-accent-soft: rgba(255, 106, 96, 0.14);
  --ph-grid: rgba(255, 120, 100, 0.06);
  --ph-glow: rgba(220, 49, 40, 0.16);
  --ph-app-bg: #111114;
  --ph-app-ink: #f2f2f5;
  --ph-app-muted: #8e8e96;
  --ph-app-label: #a4a4ac;
  --ph-app-tool: #d0d0d6;
  --ph-app-line: #2c2c31;
  --ph-app-fill: #1f1f24;
  --ph-app-card: #1c1c20;
  --ph-app-seg-on: #3a3a41;
  --ph-app-bar: rgba(44, 44, 50, 0.88);
  --ph-app-canvas: #050506;
  --ph-app-blue: #3d86ff;
  --ph-app-blue-soft: rgba(61, 134, 255, 0.2);
  --ph-app-tab-on: rgba(61, 134, 255, 0.2);
  --ph-app-red-soft: rgba(231, 60, 50, 0.24);
  --ph-app-found-bg: rgba(245, 180, 0, 0.14);
  --ph-app-found-ink: #f5c451;
  --ph-app-sig: #a9bcff;
  --ph-scene-plate: #221e1a;
  --ph-scene-paper: #312b25;
  --ph-scene-edge: #443c34;
  --ph-scene-bar: #4b433a;
  --ph-scene-bar-strong: #7a7064;
  --ph-scene-field: #2a2520;
  --ph-scene-ink: #a9bcff;
}


/* -------------------------------------------------------------------------
 * Base
 * ---------------------------------------------------------------------- */

.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

.ph *,
.ph *::before,
.ph *::after {
  box-sizing: border-box;
}

/*
 * The resets sit under `:where()` so they weigh nothing.
 *
 * Written as `.ph p` they scored (0,1,1) and beat every one-class rule that sets
 * a paragraph's margin — `.ph__lead`, `.ph__note`, `.ph__eyebrow`,
 * `.ph__doc-updated`, `.ph__data-where` — so each of those spacings silently
 * came out as 0 and the lead sat on the headline, the notes on the cards above
 * them and the update date on the page title. Zero-weight resets let the
 * component rules below say what they mean.
 */
:where(.ph) h1,
:where(.ph) h2,
:where(.ph) h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.ph h1 {
  font-size: clamp(32px, 4.4vw, 52px);
}

.ph h2 {
  font-size: clamp(25px, 2.9vw, 36px);
}

.ph h3 {
  font-size: 19px;
  font-weight: 700;
}

:where(.ph) p {
  margin: 0;
}

.ph a {
  color: inherit;
}

.ph img {
  max-width: 100%;
  height: auto;
}

.ph :focus-visible {
  outline: 3px solid var(--ph-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.ph__container {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

.ph__measure {
  max-width: 760px;
}

.ph__section {
  padding-block: var(--ph-band);
}

/* The header is sticky, so anything an in-page link scrolls to has to clear it —
   every band with an anchor, every numbered heading on a policy page. */
.ph [id] {
  scroll-margin-top: calc(var(--ph-header-h) + 16px);
}

.ph__section--tint {
  background: var(--ph-tint);
}

.ph__skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 12px 18px;
  background: var(--ph-accent);
  color: var(--ph-on-accent);
  border-radius: 0 0 var(--ph-radius-sm) 0;
  text-decoration: none;
  font-weight: 700;
}

.ph__skip:focus {
  left: 0;
}

/* -------------------------------------------------------------------------
 * Type and controls
 * ---------------------------------------------------------------------- */

.ph__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 13px 26px;
  border-radius: var(--ph-pill);
  background: linear-gradient(180deg, var(--ph-accent-2), var(--ph-accent));
  color: var(--ph-on-accent);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  box-shadow: var(--ph-shadow-sm);
}

.ph__button:hover {
  filter: brightness(1.05);
}

.ph__button--ghost {
  background: transparent;
  color: var(--ph-ink);
  border: 1.5px solid var(--ph-line);
  box-shadow: none;
}

.ph__button--small {
  min-height: 42px;
  padding: 10px 20px;
  font-size: 15px;
}

.ph__text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ph-accent-text);
  font-weight: 700;
  text-decoration: none;
}

.ph__text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ph__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 22px;
}

.ph__eyebrow {
  margin-bottom: 12px;
  color: var(--ph-accent-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ph__lead {
  margin-top: 16px;
  color: var(--ph-muted);
  font-size: clamp(17px, 1.5vw, 19px);
}

.ph__accent {
  color: var(--ph-accent-text);
}

.ph__note {
  margin-top: 22px;
  color: var(--ph-muted);
  font-size: 15px;
}

.ph__empty {
  padding: 40px 0;
  color: var(--ph-muted);
  text-align: center;
}

.ph__section-head {
  max-width: 720px;
  margin-bottom: var(--ph-head-gap);
}

.ph__section-head--center {
  margin-inline: auto;
  text-align: center;
}

.ph__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------------- */

/*
 * No `backdrop-filter` here on mobile, and that is not a style choice.
 *
 * `backdrop-filter` (like `filter` and `transform`) makes an element the
 * containing block for its `position: fixed` descendants. With it on, the
 * drawer's `top: 62px; bottom: 0` resolved against the 62px-tall HEADER rather
 * than the viewport, and the menu opened as a 48px sliver with the close button
 * in it. The blur is restored at ≥900px, where the panel is static and cannot be
 * caught by it.
 */
.ph__header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ph-surface);
  border-bottom: 1px solid var(--ph-line);
}

/*
 * The bar keeps ONE height on mobile, always.
 *
 * It used to be a wrapping flex row with the menu panel as a full-width child,
 * so opening the menu grew the sticky header and shoved the page under it. The
 * panel is now a fixed overlay (below) and the bar never wraps, which is what
 * makes the header a fixed, known quantity — the drawer hangs off it and every
 * in-page anchor offsets by it.
 */
.ph__header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--ph-header-h);
  flex-wrap: nowrap;
}

.ph__menu-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: var(--ph-radius-sm);
  border: 1px solid var(--ph-line);
  color: inherit;
  text-decoration: none;
}

/*
 * Three bars, drawn absolutely so the box stays 2px tall whatever the bars do.
 *
 * The earlier version put the outer two in flow with `position: relative` and
 * `top` nudges, which meant crossing them into an × moved the box as well as the
 * bars. Absolute takes the pseudo-elements out of layout entirely: the × is two
 * rotations and nothing shifts.
 */
.ph__menu-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ph__menu-bars::before,
.ph__menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ph__menu-bars::before {
  top: -6px;
}

.ph__menu-bars::after {
  top: 6px;
}

/* Open: the middle bar goes, the outer two cross. */
.ph__menu-bars--x {
  background: transparent;
}

.ph__menu-bars--x::before {
  top: 0;
  transform: rotate(45deg);
}

.ph__menu-bars--x::after {
  top: 0;
  transform: rotate(-45deg);
}

/*
 * Which of the two links is showing.
 *
 * `:has()` because the buttons come BEFORE the drawer in the markup and there is
 * no previous-sibling combinator. It is not a new floor for this theme — the
 * palette already depends on `color-mix()`, which landed later than `:has()` in
 * every engine. Where `:has()` is missing the opener simply stays put; the menu
 * still opens, and still closes on any menu link or the back button.
 */
.ph__menu-button--close {
  display: none;
}

.ph__header-inner:has(#ph-menu:target) .ph__menu-button--open {
  display: none;
}

/* Open, and looking it: the button wears the accent while the drawer is down. */
.ph__header-inner:has(#ph-menu:target) .ph__menu-button--close {
  display: inline-flex;
  border-color: var(--ph-accent);
  background: color-mix(in srgb, var(--ph-accent) 12%, transparent);
  color: var(--ph-accent-text);
}

/*
 * The drawer.
 *
 * `position: fixed` under the bar, so opening it changes NOTHING about the
 * header's height or the page's layout — the defect this replaced. It scrolls
 * itself when a long menu meets a short phone, and `overscroll-behavior` keeps
 * that scroll from chaining into the page behind it.
 */
.ph__header-panel {
  display: none;
  position: fixed;
  top: var(--ph-header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--ph-surface);
  border-top: 1px solid var(--ph-line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ph__header-panel .ph__nav {
  margin-top: 4px;
}

.ph__header-panel:target {
  display: flex;
}

.ph__nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__nav a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--ph-line);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.ph__nav a:hover {
  color: var(--ph-accent-text);
}

.ph__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.ph__brand img {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
}

.ph__brand-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--ph-accent-2), var(--ph-accent));
  color: var(--ph-on-accent);
}

.ph__brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph__brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.25;
}

.ph__brand-text strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph__brand-text small {
  color: var(--ph-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph__brand--compact img,
.ph__brand--compact .ph__brand-mark {
  width: 38px;
  height: 38px;
}

.ph__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.ph__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--ph-radius-sm);
  border: 1px solid var(--ph-line);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.ph__icon-btn svg {
  width: 20px;
  height: 20px;
}

/* ---- Language switcher ---- */

.ph__lang {
  position: relative;
}

.ph__lang summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--ph-radius-sm);
  border: 1px solid var(--ph-line);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.ph__lang summary::-webkit-details-marker {
  display: none;
}

.ph__lang summary i {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

/*
 * A flag is a small rectangle of real-world colour, so it needs an edge of its
 * own: the Japanese flag is a white field, and without a rim it reads on a white
 * page as a floating red dot.
 *
 * The rim is an OUTSET ring, not `inset`. An inset box-shadow paints between the
 * element's background and its content, and each of these flags starts with a
 * full-bleed `<rect>` — which covered the ring exactly where it was needed. Grey
 * rather than black so the same value works in both colour modes.
 */
.ph__flag {
  width: 21px;
  height: 14px;
  flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.45);
}

.ph__lang ul {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  min-width: 178px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius-sm);
  box-shadow: var(--ph-shadow);
}

.ph__lang a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
}

.ph__lang a:hover,
.ph__lang a[aria-current="page"] {
  background: var(--ph-panel-2);
}

/* -------------------------------------------------------------------------
 * Store buttons
 * ---------------------------------------------------------------------- */

.ph__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.ph .ph__store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px 10px 16px;
  border-radius: var(--ph-radius-sm);
  background: var(--ph-ink);
  color: var(--ph-bg);
  text-decoration: none;
}

.ph__store svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.ph__store span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ph__store small {
  font-size: 11px;
  opacity: 0.75;
}

.ph__store strong {
  font-size: 17px;
  font-weight: 700;
}

.ph .ph__store--soon {
  background: transparent;
  color: var(--ph-muted);
  border: 1.5px dashed var(--ph-line);
}


/* -------------------------------------------------------------------------
 * The flow
 * ---------------------------------------------------------------------- */

.ph__flow {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.ph__flow-step {
  position: relative;
  padding: 18px 20px 24px;
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
}

.ph__flow-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ph-accent-2), var(--ph-accent));
  color: var(--ph-on-accent);
  font-size: 15px;
  font-weight: 700;
}

.ph__flow-step p {
  margin-top: 8px;
  color: var(--ph-muted);
  font-size: 15.5px;
}

/* -------------------------------------------------------------------------
 * Features
 * ---------------------------------------------------------------------- */

.ph__features {
  display: grid;
  gap: 16px;
}

.ph__feature {
  padding: 22px;
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
}

.ph__feature-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ph-accent) 12%, transparent);
  color: var(--ph-accent-text);
}

.ph__feature p {
  margin-top: 8px;
  color: var(--ph-muted);
  font-size: 15.5px;
}

/* -------------------------------------------------------------------------
 * Numbers
 * ---------------------------------------------------------------------- */

.ph__stats-band {
  padding-block: var(--ph-band);
  background: var(--ph-tint);
}

.ph__stats {
  display: grid;
  gap: 20px;
  margin: 0;
}

.ph__stat {
  padding: 20px;
  border-radius: var(--ph-radius);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
  text-align: center;
}

.ph__stat dt {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ph-accent-text);
  font-variant-numeric: tabular-nums;
}

.ph__stat dd {
  margin: 8px 0 0;
  color: var(--ph-muted);
  font-size: 14.5px;
}


/* -------------------------------------------------------------------------
 * The data list
 * ---------------------------------------------------------------------- */

.ph__data {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__data-item {
  padding: 18px 20px;
  border-radius: var(--ph-radius);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
}

.ph__data-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ph__data-head h3 {
  font-size: 17px;
}

.ph__chip {
  padding: 4px 12px;
  border-radius: var(--ph-pill);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

/*
 * "Stays on your device" is the reassuring answer and wears the accent tint; the
 * one worth reading twice is amber — "only when you share it yourself".
 */
.ph__chip--stays {
  background: color-mix(in srgb, var(--ph-accent) 12%, transparent);
  color: var(--ph-accent-text);
}

.ph__chip--leaves {
  background: color-mix(in srgb, var(--ph-medium) 20%, transparent);
  color: var(--ph-ink);
}

.ph__data-when {
  color: var(--ph-muted);
  font-size: 13.5px;
}

.ph__data-where {
  margin-top: 8px;
  color: var(--ph-muted);
  font-size: 15.5px;
}

/* -------------------------------------------------------------------------
 * Notices
 * ---------------------------------------------------------------------- */

.ph__notice {
  padding-block: var(--ph-band-sm);
}

.ph__notice-inner {
  display: flex;
  gap: 18px;
  padding: 24px;
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
  border-left: 4px solid var(--ph-muted);
}

.ph__notice--info .ph__notice-inner {
  border-left-color: var(--ph-accent);
}

.ph__notice--warn .ph__notice-inner {
  border-left-color: var(--ph-medium);
}

.ph__notice--critical .ph__notice-inner {
  border-left-color: var(--ph-danger);
}

.ph__notice-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--ph-panel-2);
}

.ph__notice-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph__notice h2 {
  font-size: 21px;
}

.ph__notice p {
  margin-top: 8px;
  color: var(--ph-muted);
  font-size: 15.5px;
}

.ph__notice-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ph__notice-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 14px;
  border-left: 2px solid var(--ph-line);
}

.ph__notice-list b {
  font-size: 15.5px;
}

.ph__notice-list span {
  color: var(--ph-muted);
  font-size: 15px;
}

/* -------------------------------------------------------------------------
 * FAQ
 * ---------------------------------------------------------------------- */

.ph__faq {
  display: grid;
  gap: 10px;
}

.ph__faq-item {
  padding: 4px 20px;
  border-radius: var(--ph-radius);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
}

.ph__faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.ph__faq-item summary::-webkit-details-marker {
  display: none;
}

.ph__faq-item summary i {
  flex: none;
  margin-right: 3px;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid var(--ph-accent);
  border-bottom: 2.5px solid var(--ph-accent);
  transform: translateY(-3px) rotate(45deg);
}

.ph__faq-item[open] summary i {
  transform: translateY(2px) rotate(-135deg);
}

.ph__faq-item p {
  padding-bottom: 18px;
  color: var(--ph-muted);
  font-size: 15.5px;
}

/* -------------------------------------------------------------------------
 * Closing band
 * ---------------------------------------------------------------------- */

.ph__cta {
  padding-block: var(--ph-band);
  background: var(--ph-tint);
  background-image:
    linear-gradient(var(--ph-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-grid) 1px, transparent 1px);
  background-size: 34px 34px;
}

.ph__cta-inner {
  max-width: 720px;
  text-align: center;
}

.ph__cta-inner .ph__stores,
.ph__cta-inner .ph__actions {
  justify-content: center;
}

/* -------------------------------------------------------------------------
 * Pages, documents and prose
 * ---------------------------------------------------------------------- */

.ph__page-head {
  padding-block: clamp(36px, 4vw, 60px) 0;
}

.ph__page-head h1 {
  max-width: 22ch;
}

.ph__doc-updated {
  margin-top: 14px;
  color: var(--ph-muted);
  font-size: 14px;
}

.ph__doc-lead {
  padding: 18px 20px;
  border-radius: var(--ph-radius);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
  color: var(--ph-ink);
}

/*
 * A page is ONE column, whatever the blocks inside it happen to be.
 *
 * Every block draws its own full-bleed band with a container inside, and those
 * containers disagree on purpose: prose is set to a reading measure (760px)
 * while a data list takes the full 1180px, because on the HOMEPAGE that
 * difference is the layout. On a privacy page it is not a layout — it is text
 * that steps in and out by 200px on each side as the reader scrolls. So this
 * pins every container on such a page to one width, and the reading measure
 * inside it becomes a no-op.
 */
.ph__page--doc .ph__container {
  width: min(880px, 100% - 40px);
}

.ph__page--doc .ph__measure {
  max-width: none;
}

.ph__doc .ph__section {
  padding-block: 0;
}

.ph__doc .ph__section + .ph__section {
  padding-top: var(--ph-doc-gap);
}

/* The page head ends in the contents box and the last section ends in prose;
   neither is a band with its own padding, so the document supplies the gap to
   the first heading and to the footer itself. */
.ph__doc .ph__page-head {
  padding-bottom: var(--ph-doc-gap);
}

.ph__doc {
  padding-bottom: var(--ph-band);
}


/*
 * A block heading inside a document is a section heading like any other.
 *
 * The data list draws its heading through the theme's normal section head, which
 * is sized for a marketing band (up to 36px). On the privacy page that heading is
 * numbered and sits in the contents list beside prose headings set at 26px, so
 * left alone it printed one section of the document a size larger than the rest.
 */
.ph__doc .ph__section-head h2 {
  font-size: clamp(21px, 2.2vw, 26px);
}

.ph__doc .ph__section-head {
  margin-bottom: 18px;
}

.ph__toc {
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: var(--ph-radius);
  background: var(--ph-panel-2);
}

.ph__toc b {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ph-muted);
}

.ph__toc ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__toc a {
  color: var(--ph-accent-text);
  font-size: 15px;
  text-decoration: none;
}

.ph__toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ph__prose {
  font-size: 17px;
}

.ph__prose h2 {
  margin-top: 38px;
  font-size: clamp(21px, 2.2vw, 26px);
}

.ph__prose h3 {
  margin-top: 26px;
}

.ph__prose h2:first-child,
.ph__prose h3:first-child {
  margin-top: 0;
}

.ph__prose p,
.ph__prose ul,
.ph__prose ol {
  margin-top: 14px;
}

.ph__prose ul,
.ph__prose ol {
  padding-left: 22px;
}

/* The host page's reset strips list markers; prose lists need theirs back, or
   an indented list reads as a stray indented paragraph. */
.ph__prose ul {
  list-style: disc;
}

.ph__prose ol {
  list-style: decimal;
}

.ph__prose li::marker {
  color: var(--ph-muted);
}

.ph__prose li {
  margin-top: 7px;
}

.ph__prose a {
  color: var(--ph-accent-text);
  text-underline-offset: 3px;
}

.ph__prose strong {
  font-weight: 700;
}

.ph__prose table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: 15.5px;
}

.ph__prose th,
.ph__prose td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--ph-line);
  text-align: left;
  vertical-align: top;
}

.ph__prose blockquote {
  margin: 20px 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--ph-accent);
  color: var(--ph-muted);
}

.ph__figure {
  margin: 0;
}

.ph__figure img {
  border-radius: var(--ph-radius);
}

.ph__figure figcaption {
  margin-top: 10px;
  color: var(--ph-muted);
  font-size: 14px;
}

/* -------------------------------------------------------------------------
 * Posts
 * ---------------------------------------------------------------------- */

.ph__post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--ph-muted);
  font-size: 14px;
}

.ph__post-grid {
  display: grid;
  gap: 16px;
}

.ph__post-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  border: 1px solid var(--ph-line);
}

.ph__post-card h3 {
  margin-top: 6px;
}

.ph__post-card h3 a {
  text-decoration: none;
}

.ph__post-card p {
  margin-top: 8px;
  color: var(--ph-muted);
  font-size: 15.5px;
}

.ph__post-card-date {
  color: var(--ph-muted);
  font-size: 13px;
}

.ph__pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.ph__pager a {
  min-width: 42px;
  padding: 9px 12px;
  border-radius: var(--ph-radius-sm);
  border: 1px solid var(--ph-line);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.ph__pager a[aria-current="page"] {
  background: var(--ph-accent);
  border-color: var(--ph-accent);
  color: var(--ph-on-accent);
}

/* -------------------------------------------------------------------------
 * 404 / 500
 * ---------------------------------------------------------------------- */

.ph__state {
  padding-block: clamp(60px, 9vw, 120px);
  text-align: center;
}

.ph__state .ph__measure {
  margin-inline: auto;
}

.ph__state-mark {
  font-size: clamp(64px, 11vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ph-line);
}

.ph__state h1 {
  margin-top: 12px;
}

.ph__state p {
  margin-top: 14px;
  color: var(--ph-muted);
}

.ph__state .ph__actions {
  justify-content: center;
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.ph__footer {
  padding-block: var(--ph-band) 32px;
  background: var(--ph-surface);
  border-top: 1px solid var(--ph-line);
}

/*
 * Two link columns from the narrowest screen up.
 *
 * "Product" and "More" are four or five one-word links each. Stacked one per
 * row on a phone they turned the footer into a column of ten items a thumb has
 * to scroll past; side by side they read as two short lists and the footer ends
 * a screen earlier. The brand block and Contact keep the full width — a
 * paragraph and an email address do not halve well.
 */
.ph__footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 20px;
}

.ph__footer-about,
.ph__footer-contact {
  grid-column: 1 / -1;
}

.ph__footer-about p {
  margin-top: 16px;
  color: var(--ph-muted);
  font-size: 15px;
}

.ph__footer-build {
  font-variant-numeric: tabular-nums;
}

.ph__footer-col h2 {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ph-muted);
}

.ph__footer-col ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__footer-col a {
  font-size: 15px;
  text-decoration: none;
}

.ph__footer-col a:hover {
  color: var(--ph-accent-text);
}

.ph__footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/*
 * Centred on a phone, split to the two edges on a desktop.
 *
 * `space-between` on a narrow screen does nothing useful: both halves wrap onto
 * their own row and each sits hard against the left margin, which reads as two
 * stray lines rather than as the closing rule of the page.
 */
.ph__footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--ph-line);
  color: var(--ph-muted);
  font-size: 13.5px;
  text-align: center;
}

.ph__footer-bottom div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.ph__footer-bottom a {
  text-decoration: none;
}

.ph__footer-bottom a:hover {
  color: var(--ph-accent-text);
}

.ph__builtwith {
  margin-left: 10px;
}


/* -------------------------------------------------------------------------
 * Widths
 *
 * Mobile first, and the two breakpoints are where the CONTENT needs them, not
 * where a device happens to be: 640px is where two cards fit side by side, and
 * 900px is where the header stops needing a menu button and the hero can put the
 * phone next to the words.
 * ---------------------------------------------------------------------- */

@media (min-width: 640px) {
  .ph__flow,
  .ph__features,
  .ph__stats,
  .ph__post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  :root {
    --ph-header-h: 72px;
  }

  .ph__header {
    background: color-mix(in srgb, var(--ph-surface) 92%, transparent);
    backdrop-filter: blur(12px);
  }

  /* Above this width the menu is not a drawer at all: it is a row in the bar,
     always open, static, with no target to reach and no button to reach it. */
  .ph__menu-button,
  .ph__header-inner:has(#ph-menu:target) .ph__menu-button--close {
    display: none;
  }

  .ph__header-panel,
  .ph__header-panel:target {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    width: auto;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border-top: 0;
    overflow: visible;
  }

  .ph__nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 22px;
  }

  .ph__nav a {
    padding: 8px 0;
    border-bottom: 0;
    font-size: 16px;
    font-weight: 600;
  }

  .ph__header-actions {
    margin-top: 0;
  }

  .ph__lang ul {
    top: calc(100% + 8px);
    bottom: auto;
  }

  .ph__brand img,
  .ph__brand-mark {
    width: 44px;
    height: 44px;
  }

  .ph__brand-text strong {
    font-size: 19px;
  }

  /* The phones get the wider half. Two app screens side by side need more
     room than a headline and three chips, and the headline reads fine at 500px. */
  .ph__hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  }

  .ph__flow {
    grid-template-columns: repeat(4, 1fr);
  }

  .ph__features {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph__stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .ph__post-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph__footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }

  .ph__footer-about,
  .ph__footer-contact {
    grid-column: auto;
  }

  .ph__footer-bottom {
    justify-content: space-between;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph * {
    animation: none !important;
    transition: none !important;
  }
}



/* =========================================================================
 * PDF Hanko
 *
 * Everything below is this theme's own. It sits after the shared furniture so
 * it can restyle it without rewriting its layout.
 * ====================================================================== */

.ph {
  font-family: var(--ph-font);
  font-size: 16.5px;
  line-height: 1.7;
}

/* Japanese sets looser and breaks at phrase boundaries where the engine can:
   a headline broken in the middle of 押印 reads as a typo. */
.ph:lang(ja) {
  letter-spacing: 0.02em;
}

.ph :lang(ja) :is(h1, h2, h3),
.ph:lang(ja) :is(h1, h2, h3) {
  word-break: auto-phrase;
  letter-spacing: 0.01em;
}

.ph h1 {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.16;
}

.ph__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ph__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.08em;
}

/* A short red rule before every eyebrow: the stroke a brush leaves before the
   first character. */
.ph__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ph-accent);
}

.ph__section-head--center .ph__eyebrow {
  justify-content: center;
}

.ph__note--center {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.ph__section--tint {
  background: var(--ph-tint);
  border-block: 1px solid var(--ph-line);
}

/* ---- Buttons ---- */

.ph__button {
  background: var(--ph-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 20px -8px color-mix(in srgb, var(--ph-accent) 70%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ph__button:hover {
  filter: none;
  transform: translateY(-1px);
  background: var(--ph-accent-2);
}

.ph__button--ghost {
  background: var(--ph-panel);
  color: var(--ph-ink);
  border: 1px solid var(--ph-line);
  box-shadow: none;
}

.ph__button--ghost:hover {
  background: var(--ph-panel);
  border-color: var(--ph-accent);
  color: var(--ph-accent-text);
}

.ph .ph__store {
  transition: transform 0.15s ease;
}

.ph .ph__store:hover {
  transform: translateY(-1px);
}

/* ---- Header ---- */

.ph__header {
  background: var(--ph-surface);
}

.ph__brand img {
  border-radius: 11px;
  box-shadow: 0 2px 6px -2px rgba(215, 38, 30, 0.45);
}

.ph__brand-mark {
  background: linear-gradient(160deg, #f0524a, #d7261e);
  color: var(--ph-shu);
  border-radius: 11px;
  box-shadow: 0 2px 6px -2px rgba(215, 38, 30, 0.45);
}

.ph__brand-mark svg {
  width: 100%;
  height: 100%;
  stroke: none;
}

/* =========================================================================
 * The seal
 * ====================================================================== */

.ph__hanko {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/*
 * The lettering is stroked as well as filled. Mincho's horizontals are hairlines,
 * and a hairline at 30px — or under the worn-ink noise, which eats anything that
 * thin — disappears and leaves 山田 as three vertical bars. Real seal lettering is
 * heavy anyway; the stroke gives it that weight in whichever Mincho arrives.
 * (CSS beats the `stroke="none"` presentation attribute on the group, on purpose.)
 */
.ph__hanko text {
  font-family: var(--ph-seal-font);
  font-weight: 700;
  letter-spacing: 0;
  stroke: currentColor;
  stroke-width: 1.1px;
  stroke-linejoin: round;
  paint-order: stroke;
}

.ph__hanko--worn text {
  stroke-width: 2px;
}

/* =========================================================================
 * Hero
 * ====================================================================== */

.ph__hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(36px, 5vw, 80px) var(--ph-band);
  background-color: var(--ph-bg);
  background-image:
    radial-gradient(60% 70% at 85% 30%, var(--ph-glow), transparent 70%),
    linear-gradient(var(--ph-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-grid) 1px, transparent 1px);
  background-size:
    100% 100%,
    30px 30px,
    30px 30px;
  border-bottom: 1px solid var(--ph-line);
}

.ph__hero-grid {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.ph__hero-copy h1 .ph__accent {
  display: block;
  margin-top: 6px;
  color: var(--ph-accent-text);
}

.ph__hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ph__hero-notes li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  color: var(--ph-ink);
  font-size: 14.5px;
  font-weight: 600;
}

.ph__hero-notes .ph__icon {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--ph-accent);
  color: #fff;
  stroke-width: 3;
}

/* =========================================================================
 * The phones
 *
 * The whole mockup scales off ONE number: `--pp` is the screen width, read
 * from the phone's own rendered width with `cqw`, and every size inside is a
 * fraction of it. The pair shrinks to a 390px viewport without a single extra
 * media query. The px value is the fallback where container queries are
 * missing — a `--pp` that failed to parse would take every calc() with it.
 *
 * The screens are the app in its light appearance in both of the site's modes:
 * a phone held up in a dark room still shows the app it is running.
 * ====================================================================== */

.ph__phones {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
  width: 100%;
}

.ph__phone {
  container-type: inline-size;
  flex: 1 1 0;
  min-width: 0;
  max-width: 300px;
}

@media (max-width: 619px) {
  .ph__phone--second {
    display: none;
  }
}

.ph__phone-screen {
  --pp: 264px;
  --pp: 100cqw;
  --app-ink: var(--ph-app-ink);
  --app-muted: var(--ph-app-muted);
  --app-line: var(--ph-app-line);
  --app-fill: var(--ph-app-fill);
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border: calc(var(--pp) * 0.028) solid #16161a;
  border-radius: calc(var(--pp) * 0.14);
  background: var(--ph-app-bg);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    var(--ph-shadow);
  color: var(--app-ink);
  font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  font-size: calc(var(--pp) * 0.042);
  letter-spacing: 0;
  line-height: 1.3;
}

/* The dynamic island: a pill of black at the top that makes the frame a phone. */
.ph__phone-screen::before {
  content: "";
  position: absolute;
  top: calc(var(--pp) * 0.025);
  left: 50%;
  z-index: 3;
  width: 30%;
  height: calc(var(--pp) * 0.075);
  border-radius: 999px;
  background: #0b0b0d;
  transform: translateX(-50%);
}

.ph__app {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: calc(var(--pp) * 0.035);
  min-height: 0;
  padding: 0 calc(var(--pp) * 0.055) calc(var(--pp) * 0.24);
}

.ph__app b,
.ph__app small {
  display: block;
}

.ph__app small {
  color: var(--app-muted);
  font-size: calc(var(--pp) * 0.034);
}

.ph__app em,
.ph__app i {
  font-style: normal;
}

.ph__app svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph__app .ph__hanko,
.ph__app .ph__hanko * {
  stroke-linecap: butt;
}

/* ---- Status bar ---- */

.ph__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--pp) * 0.125);
  padding: 0 calc(var(--pp) * 0.03);
  font-size: calc(var(--pp) * 0.042);
  font-weight: 700;
}

.ph__status-icons {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--pp) * 0.016);
}

.ph__app .ph__status-icons svg {
  width: auto;
  height: calc(var(--pp) * 0.036);
  fill: currentColor;
  stroke: none;
}

/* ---- Tab bar: a floating capsule, as iOS 26 draws it ---- */

.ph__app-tabs {
  position: absolute;
  right: calc(var(--pp) * 0.045);
  bottom: calc(var(--pp) * 0.05);
  left: calc(var(--pp) * 0.045);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: calc(var(--pp) * 0.018);
  border-radius: 999px;
  background: var(--ph-app-bar);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

.ph__app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--pp) * 0.006);
  padding: calc(var(--pp) * 0.018) 0;
  border-radius: 999px;
  color: var(--app-ink);
  font-size: calc(var(--pp) * 0.028);
  font-weight: 600;
  white-space: nowrap;
}

.ph__app-tab svg {
  width: calc(var(--pp) * 0.07);
  height: calc(var(--pp) * 0.07);
}

.ph__app-tab--on {
  background: var(--ph-app-tab-on);
  color: var(--ph-app-blue);
}

/* ---- 01 Home ---- */

.ph__app-topbtns {
  display: flex;
  gap: calc(var(--pp) * 0.055);
  align-self: flex-end;
  padding: calc(var(--pp) * 0.025) calc(var(--pp) * 0.045);
  border-radius: 999px;
  background: var(--ph-app-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  color: var(--ph-app-blue);
}

.ph__app-topbtns svg {
  width: calc(var(--pp) * 0.065);
  height: calc(var(--pp) * 0.065);
}

.ph__app-hello {
  display: flex;
  align-items: center;
  gap: calc(var(--pp) * 0.035);
}

.ph__app-hello .ph__brand-mark {
  width: calc(var(--pp) * 0.16);
  height: calc(var(--pp) * 0.16);
  flex: none;
  border-radius: calc(var(--pp) * 0.04);
}

.ph__app-hello b {
  font-size: calc(var(--pp) * 0.088);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.ph__app-hello small {
  font-size: calc(var(--pp) * 0.029);
}

.ph__app-search {
  display: flex;
  align-items: center;
  gap: calc(var(--pp) * 0.025);
  padding: calc(var(--pp) * 0.028) calc(var(--pp) * 0.04);
  border-radius: calc(var(--pp) * 0.035);
  background: var(--app-fill);
  color: var(--app-muted);
}

.ph__app-search svg {
  width: calc(var(--pp) * 0.05);
  height: calc(var(--pp) * 0.05);
}

.ph__app-search small {
  flex: 1;
  font-size: calc(var(--pp) * 0.038);
}

.ph__app-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--pp) * 0.03);
}

.ph__app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--pp) * 0.015);
  height: calc(var(--pp) * 0.21);
  border-radius: calc(var(--pp) * 0.045);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ph__app-tile svg {
  width: calc(var(--pp) * 0.085);
  height: calc(var(--pp) * 0.085);
}

.ph__app-tile b {
  font-size: calc(var(--pp) * 0.04);
  font-weight: 700;
}

.ph__app-tile--blue {
  background: linear-gradient(180deg, #3f8cff, #1e6ff1);
}

.ph__app-tile--navy {
  background: linear-gradient(180deg, #4166c2, #1e3f94);
}

.ph__app-tile--red {
  background: linear-gradient(180deg, #f2554c, #d7261e);
}

.ph__app-tile--red svg {
  fill: #fff;
}

.ph__app-tile--purple {
  background: linear-gradient(180deg, #a07cf2, #7650d8);
}

.ph__app-tile--blue svg {
  fill: #fff;
}

.ph__app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: calc(var(--pp) * 0.01);
}

.ph__app-head b {
  font-size: calc(var(--pp) * 0.05);
  font-weight: 800;
}

.ph__app-head svg,
.ph__app-more {
  width: calc(var(--pp) * 0.07);
  height: calc(var(--pp) * 0.07);
  color: var(--ph-app-blue);
  stroke-width: 3;
}

.ph__app-files {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__app-files li {
  display: flex;
  align-items: center;
  gap: calc(var(--pp) * 0.035);
  padding: calc(var(--pp) * 0.022) 0;
  border-bottom: 1px solid var(--app-line);
}

.ph__app-files li > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.ph__app-files b {
  overflow: hidden;
  font-size: calc(var(--pp) * 0.04);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph__app-files small {
  font-size: calc(var(--pp) * 0.03);
}

/* The PDF file icon: a red page with its corner folded and "PDF" on it. */
.ph__app-pdf {
  display: flex;
  flex: none;
  align-items: flex-end;
  justify-content: center;
  width: calc(var(--pp) * 0.085);
  height: calc(var(--pp) * 0.105);
  padding-bottom: calc(var(--pp) * 0.012);
  border-radius: calc(var(--pp) * 0.012);
  background: linear-gradient(225deg, var(--ph-app-bg) 0 18%, #e5383b 18%);
  color: #fff;
  font-size: calc(var(--pp) * 0.022);
  font-weight: 800;
}

/* ---- 05 Editor ---- */

.ph__app--editor {
  padding-bottom: 0;
}

.ph__app-nav {
  display: grid;
  grid-template-columns: calc(var(--pp) * 0.16) 1fr calc(var(--pp) * 0.16);
  align-items: center;
}

.ph__app-nav b {
  overflow: hidden;
  font-size: calc(var(--pp) * 0.042);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph__app-back {
  width: calc(var(--pp) * 0.07);
  height: calc(var(--pp) * 0.07);
  color: var(--ph-app-blue);
  stroke-width: 2.4;
}

.ph__app-done {
  justify-self: end;
  padding: calc(var(--pp) * 0.012) calc(var(--pp) * 0.03);
  border-radius: 999px;
  background: var(--ph-blue);
  color: #fff;
  font-size: calc(var(--pp) * 0.034);
  font-weight: 700;
  white-space: nowrap;
}

.ph__app-canvas {
  position: relative;
  flex: 1;
  margin: 0 calc(var(--pp) * -0.055);
  padding: calc(var(--pp) * 0.06) calc(var(--pp) * 0.07);
  background: var(--ph-app-canvas);
}

.ph__app-page-n {
  position: absolute;
  top: calc(var(--pp) * 0.02);
  right: calc(var(--pp) * 0.04);
  z-index: 1;
  padding: calc(var(--pp) * 0.006) calc(var(--pp) * 0.022);
  border-radius: 999px;
  background: rgba(40, 40, 46, 0.72);
  color: #fff;
  font-size: calc(var(--pp) * 0.028);
  font-weight: 600;
}

.ph__app-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(var(--pp) * 0.028);
  aspect-ratio: 1 / 1.3;
  padding: calc(var(--pp) * 0.07) calc(var(--pp) * 0.065);
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  /* A PDF page is white in both modes, as the app draws it (SPEC §1): the ink on
     it is the document's, not the interface's. */
  color: #111114;
}

.ph__app-paper-title {
  margin-bottom: calc(var(--pp) * 0.01);
  font-family: var(--ph-seal-font);
  font-size: calc(var(--pp) * 0.06);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
}

.ph__app-rule {
  display: block;
  height: calc(var(--pp) * 0.012);
  border-radius: 99px;
  background: #e4e4ea;
}

.ph__app-rule--short {
  width: 62%;
}

.ph__app-field {
  display: flex;
  align-items: baseline;
  gap: calc(var(--pp) * 0.03);
  padding-bottom: calc(var(--pp) * 0.012);
  border-bottom: 1px solid #cfcfd6;
}

.ph__app-field small {
  flex: none;
  min-width: calc(var(--pp) * 0.14);
  white-space: nowrap;
  color: #55555c;
  font-size: calc(var(--pp) * 0.03);
}

.ph__app-field em {
  overflow: hidden;
  font-size: calc(var(--pp) * 0.036);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph__app-field--sign {
  margin-top: calc(var(--pp) * 0.02);
  margin-right: calc(var(--pp) * 0.2);
}

/* A handwritten name: whatever script face the visitor has, slanted, in ink. */
.ph__sig {
  display: inline-block;
  overflow: hidden;
  color: var(--ph-app-sig);
  font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Klee", "Hiragino Mincho ProN", "Yu Mincho", cursive;
  font-size: calc(var(--pp) * 0.055);
  font-style: italic;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-4deg);
}

/* On the page the signature is the document's ink, navy in both modes; elsewhere
   in the app it follows the interface (see --ph-app-sig). */
.ph__app-paper .ph__sig {
  color: #1b2a6b;
}

/* The seal just placed, still selected: dashed frame, four handles. */
.ph__app-placed {
  position: absolute;
  right: calc(var(--pp) * 0.05);
  bottom: calc(var(--pp) * 0.06);
  width: calc(var(--pp) * 0.19);
  padding: calc(var(--pp) * 0.012);
  border: 1.5px dashed var(--ph-blue);
}

.ph__app-handle {
  position: absolute;
  width: calc(var(--pp) * 0.024);
  height: calc(var(--pp) * 0.024);
  border: 1.5px solid var(--ph-blue);
  border-radius: 50%;
  background: #fff;
}

.ph__app-handle--a { top: -5px; left: -5px; }
.ph__app-handle--b { top: -5px; right: -5px; }
.ph__app-handle--c { bottom: -5px; left: -5px; }
.ph__app-handle--d { right: -5px; bottom: -5px; }

.ph__app-tools {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0 calc(var(--pp) * -0.055);
  padding: calc(var(--pp) * 0.03) calc(var(--pp) * 0.03) calc(var(--pp) * 0.07);
  border-top: 1px solid var(--app-line);
  background: var(--ph-app-card);
}

.ph__app-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--pp) * 0.008);
  color: var(--ph-app-tool);
  font-size: calc(var(--pp) * 0.028);
  white-space: nowrap;
}

.ph__app-tool svg {
  width: calc(var(--pp) * 0.068);
  height: calc(var(--pp) * 0.068);
}

.ph__app-tool--on {
  color: var(--ph-shu);
  font-weight: 700;
}

.ph__app-tool--on svg {
  fill: currentColor;
}

/* ---- 11 Stamp studio ---- */

.ph__app-large {
  margin-top: calc(var(--pp) * 0.02);
  font-size: calc(var(--pp) * 0.078);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ph__app-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: calc(var(--pp) * 0.01);
  border-radius: 999px;
  background: var(--app-fill);
  font-size: calc(var(--pp) * 0.036);
  font-weight: 600;
  text-align: center;
}

.ph__app-seg i {
  padding: calc(var(--pp) * 0.014) 0;
  border-radius: 999px;
  color: var(--ph-app-label);
}

.ph__app-seg .ph__app-seg-on {
  background: var(--ph-app-seg-on);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  color: var(--ph-shu);
}

.ph__app-chips {
  display: flex;
  gap: calc(var(--pp) * 0.018);
  overflow: hidden;
}

.ph__app-chip {
  padding: calc(var(--pp) * 0.01) calc(var(--pp) * 0.03);
  border-radius: 999px;
  background: var(--app-fill);
  color: var(--ph-app-label);
  font-size: calc(var(--pp) * 0.03);
  white-space: nowrap;
}

.ph__app-chip--on {
  background: var(--ph-app-red-soft);
  color: var(--ph-shu);
  font-weight: 700;
}

.ph__app-seals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--pp) * 0.03);
}

.ph__app-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--pp) * 0.015);
  padding: calc(var(--pp) * 0.04) calc(var(--pp) * 0.03) calc(var(--pp) * 0.025);
  border: 1px solid var(--app-line);
  border-radius: calc(var(--pp) * 0.04);
  background: var(--ph-app-card);
}

.ph__app-seal .ph__hanko {
  width: calc(var(--pp) * 0.25);
}

.ph__app-seal small {
  color: var(--ph-app-tool);
  font-size: calc(var(--pp) * 0.03);
}

.ph__app-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--pp) * 0.015);
  padding: calc(var(--pp) * 0.025);
  border: 1.5px solid var(--ph-app-blue);
  border-radius: calc(var(--pp) * 0.035);
  color: var(--ph-app-blue);
  font-size: calc(var(--pp) * 0.036);
  font-weight: 700;
}

.ph__app-add svg {
  width: calc(var(--pp) * 0.05);
  height: calc(var(--pp) * 0.05);
  stroke-width: 2.6;
}

/* ---- 09 Smart form ---- */

.ph__app-found {
  display: flex;
  align-items: center;
  gap: calc(var(--pp) * 0.018);
  padding: calc(var(--pp) * 0.025) calc(var(--pp) * 0.035);
  border-radius: calc(var(--pp) * 0.03);
  background: var(--ph-app-found-bg);
  color: var(--ph-app-found-ink);
  font-size: calc(var(--pp) * 0.034);
  font-weight: 700;
}

.ph__app-found svg {
  flex: none;
  width: calc(var(--pp) * 0.05);
  height: calc(var(--pp) * 0.05);
  fill: #f5b400;
  stroke: #f5b400;
}

.ph__app-rows {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__app-rows li {
  display: grid;
  grid-template-columns: calc(var(--pp) * 0.17) 1fr auto;
  align-items: center;
  gap: calc(var(--pp) * 0.025);
  min-height: calc(var(--pp) * 0.115);
  border-bottom: 1px solid var(--app-line);
}

.ph__app-rows small {
  color: var(--ph-app-label);
}

.ph__app-rows b {
  overflow: hidden;
  font-size: calc(var(--pp) * 0.037);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph__app-rows i {
  padding: calc(var(--pp) * 0.006) calc(var(--pp) * 0.02);
  border-radius: calc(var(--pp) * 0.015);
  background: var(--ph-app-blue-soft);
  color: var(--ph-app-blue);
  font-size: calc(var(--pp) * 0.028);
  font-weight: 700;
}

.ph__app-rows .ph__sig {
  font-size: calc(var(--pp) * 0.05);
}

.ph__app-row-seal {
  width: calc(var(--pp) * 0.1);
}

.ph__app-cta {
  padding: calc(var(--pp) * 0.03);
  border-radius: calc(var(--pp) * 0.035);
  background: var(--ph-blue);
  color: #fff;
  font-size: calc(var(--pp) * 0.038);
  font-weight: 700;
  text-align: center;
}

.ph__app-cta--soft {
  margin-top: calc(var(--pp) * -0.015);
  background: var(--ph-app-blue-soft);
  color: var(--ph-app-blue);
}

/* ---- 18 Scan: a camera, dark in both modes ---- */

.ph__app--camera {
  padding-bottom: calc(var(--pp) * 0.06);
  background: #0c0c0e;
  color: #fff;
}

.ph__app--camera small {
  color: #fff;
}

.ph__app-cambar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ph__app-cambar svg {
  width: calc(var(--pp) * 0.06);
  height: calc(var(--pp) * 0.06);
  color: #ffd60a;
  fill: #ffd60a;
}

.ph__app-viewfinder {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 0 calc(var(--pp) * -0.055);
  background: radial-gradient(circle at 50% 40%, #6d5b4b, #2b241e 75%);
}

.ph__app-sheet {
  display: flex;
  flex-direction: column;
  gap: calc(var(--pp) * 0.03);
  width: 64%;
  aspect-ratio: 1 / 1.35;
  padding: calc(var(--pp) * 0.07) calc(var(--pp) * 0.06);
  background: #fbfaf7;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transform: rotate(-3deg);
}

/* The edges the scanner found: a translucent blue quad with corner brackets. */
.ph__app-corners {
  position: absolute;
  inset: 17% 15% 20%;
  border: 2px solid rgba(64, 140, 255, 0.95);
  background: rgba(64, 140, 255, 0.14);
  transform: rotate(-3deg);
}

.ph__app-hint {
  position: absolute;
  bottom: calc(var(--pp) * 0.04);
  left: 50%;
  padding: calc(var(--pp) * 0.012) calc(var(--pp) * 0.03);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: calc(var(--pp) * 0.028) !important;
  white-space: nowrap;
  transform: translateX(-50%);
}

.ph__app-filters {
  display: flex;
  justify-content: center;
  gap: calc(var(--pp) * 0.02);
  font-size: calc(var(--pp) * 0.03);
}

.ph__app-filters i {
  padding: calc(var(--pp) * 0.008) calc(var(--pp) * 0.022);
  border-radius: 999px;
  color: #d9d9de;
}

.ph__app-filters .ph__app-filter--on {
  background: rgba(255, 214, 10, 0.18);
  color: #ffd60a;
  font-weight: 700;
}

.ph__app-shutter {
  align-self: center;
  width: calc(var(--pp) * 0.18);
  height: calc(var(--pp) * 0.18);
  border: calc(var(--pp) * 0.012) solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 calc(var(--pp) * 0.01) #0c0c0e;
}

/* The seal stamped across the gap between the two phones, as if pressed on
   the page they sit on. `multiply` lets the white screens under it show the
   ink the way paper would. */
.ph__phones-seal {
  position: absolute;
  top: 62%;
  left: 50%;
  z-index: 2;
  width: clamp(76px, 9vw, 116px) !important;
  opacity: 0.94;
  transform: translate(-50%, -50%) rotate(-14deg);
  color: var(--ph-shu) !important;
  pointer-events: none;
}

@media (max-width: 619px) {
  .ph__phones-seal {
    top: auto;
    bottom: 6%;
    left: auto;
    right: 4%;
    transform: rotate(-14deg);
  }
}

/* =========================================================================
 * Scenes
 * ====================================================================== */

.ph__scene {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 18px;
}

.ph__scene-plate {
  fill: var(--ph-scene-plate);
}

.ph__scene-paper,
.ph__scene-card {
  fill: var(--ph-scene-paper);
  stroke: var(--ph-scene-edge);
  stroke-width: 1.5;
}

.ph__scene-bar {
  fill: var(--ph-scene-bar);
}

.ph__scene-bar--strong {
  fill: var(--ph-scene-bar-strong);
}

.ph__scene-seal circle {
  fill: none;
  stroke: var(--ph-shu);
  stroke-width: 3;
}

.ph__scene-seal path {
  fill: none;
  stroke: var(--ph-shu);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.ph__scene-ink {
  fill: none;
  stroke: var(--ph-scene-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph__scene-line {
  fill: none;
  stroke: var(--ph-scene-bar-strong);
  stroke-width: 1.5;
}

.ph__scene-arrow,
.ph__scene-corner {
  fill: none;
  stroke: var(--ph-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph__scene-corner {
  stroke: var(--ph-blue);
}

.ph__scene-folder {
  fill: color-mix(in srgb, var(--ph-blue) 22%, var(--ph-scene-paper));
  stroke: var(--ph-blue);
  stroke-width: 2;
  stroke-linejoin: round;
}

.ph__scene-camera {
  fill: #2b241e;
}

.ph__scene-select {
  fill: color-mix(in srgb, var(--ph-blue) 30%, transparent);
}

.ph__scene-field {
  fill: var(--ph-scene-field);
  stroke: var(--ph-scene-bar);
}

.ph__scene-fill {
  fill: var(--ph-blue);
  opacity: 0.75;
}

.ph__scene-lifted {
  stroke: var(--ph-accent);
  stroke-width: 2;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.18));
}

.ph__scene-slot {
  fill: none;
  stroke: var(--ph-accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.ph__scene-wave,
.ph__scene-shackle {
  fill: none;
  stroke: var(--ph-muted);
  stroke-width: 5;
  stroke-linecap: round;
}

.ph__scene-slash {
  fill: none;
  stroke: var(--ph-accent);
  stroke-width: 5;
  stroke-linecap: round;
}

.ph__scene-lock {
  fill: var(--ph-accent);
}


/* =========================================================================
 * Cards: flow, features, tools, stats
 * ====================================================================== */

.ph__flow-step,
.ph__feature,
.ph__tool,
.ph__stat,
.ph__data-item,
.ph__faq-item,
.ph__post-card,
.ph__notice-inner {
  background: var(--ph-panel);
  box-shadow: var(--ph-card-shadow);
}

.ph__flow-step {
  padding: 16px 18px 22px;
}

.ph__flow-n {
  background: var(--ph-accent);
}

.ph__feature h3,
.ph__points b,
.ph__methods b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.ph__feature-mark {
  background: var(--ph-accent-soft);
  color: var(--ph-accent-text);
}

.ph__stat dt {
  color: var(--ph-accent-text);
  font-weight: 800;
}

.ph__stats-band {
  background: var(--ph-tint);
  border-block: 1px solid var(--ph-line);
}

/* ---- Plan chips: free, free with limits, Pro ---- */

.ph__plan {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--ph-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.6;
  white-space: nowrap;
}

.ph__plan--free {
  background: var(--ph-free-bg);
  color: var(--ph-free);
}

.ph__plan--partial {
  background: var(--ph-panel-2);
  color: var(--ph-muted);
  box-shadow: inset 0 0 0 1px var(--ph-line);
}

.ph__plan--pro {
  background: var(--ph-gold-bg);
  color: var(--ph-gold);
}

.ph__plan-crown {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.ph__legend {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
  padding: 16px 18px;
  border-radius: var(--ph-radius);
  background: var(--ph-tint);
  border: 1px solid var(--ph-line);
  list-style: none;
}

.ph__legend li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ph-muted);
  font-size: 14.5px;
}

.ph__tools {
  display: grid;
  gap: 16px;
}

.ph__tool {
  padding: 22px;
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius-lg);
}

.ph__tool-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.ph__tool-head .ph__feature-mark {
  margin-bottom: 0;
}

.ph__tool ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__tool li {
  padding: 12px 0;
  border-top: 1px solid var(--ph-line);
}

.ph__tool li:first-child {
  border-top: 0;
}

.ph__tool-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ph__tool-line b {
  font-size: 15.5px;
}

.ph__tool li p {
  margin-top: 4px;
  color: var(--ph-muted);
  font-size: 14.5px;
}

/* =========================================================================
 * Showcase: words beside one phone
 * ====================================================================== */

.ph__showcase-grid {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.ph__showcase-phone {
  display: flex;
  justify-content: center;
}

.ph__showcase-phone .ph__phone {
  width: min(300px, 78vw);
  flex: none;
}

.ph__points,
.ph__methods {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__points li,
.ph__methods li {
  display: flex;
  gap: 14px;
}

.ph__points .ph__feature-mark,
.ph__methods .ph__feature-mark {
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
}

.ph__points li > span:last-child,
.ph__methods li > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ph__points b,
.ph__methods b {
  font-size: 16.5px;
}

.ph__points span span,
.ph__methods span span {
  color: var(--ph-muted);
  font-size: 15px;
}

/* =========================================================================
 * Stamps: the seals the app makes, on paper
 * ====================================================================== */

.ph__stamps-band {
  background-color: var(--ph-bg);
  background-image:
    linear-gradient(var(--ph-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-grid) 1px, transparent 1px);
  background-size: 30px 30px;
  border-block: 1px solid var(--ph-line);
}

.ph__stamps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ph__stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 16px 20px;
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  box-shadow: var(--ph-card-shadow);
  text-align: center;
}

/* The seal sits on a square of paper, light in both modes — ink is only red
   on white. */
.ph__stamp-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(150px, 100%);
  aspect-ratio: 1;
  margin-bottom: 10px;
  padding: 18px;
  border-radius: 14px;
  background: var(--ph-paper);
  box-shadow: inset 0 0 0 1px rgba(60, 36, 20, 0.08);
}

.ph__stamp b {
  font-size: 16px;
}

.ph__stamp small {
  color: var(--ph-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ph__methods {
  margin-top: 32px;
}

.ph__methods li {
  padding: 20px;
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius);
  background: var(--ph-panel);
}

/* =========================================================================
 * Plans and the comparison
 * ====================================================================== */

.ph__plans {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin-inline: auto;
}

.ph__plan-card {
  position: relative;
  padding: 26px 24px 24px;
  border: 1.5px solid var(--ph-line);
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  box-shadow: var(--ph-card-shadow);
}

.ph__plan-card--featured {
  border-color: var(--ph-accent);
  background: linear-gradient(180deg, var(--ph-accent-soft), var(--ph-panel) 60%);
}

.ph__plan-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  padding: 3px 12px;
  border-radius: var(--ph-pill);
  background: var(--ph-accent);
  color: var(--ph-on-accent);
  font-size: 12.5px;
  font-weight: 800;
}

.ph__plan-card h3 {
  font-size: 16px;
  color: var(--ph-muted);
}

.ph__plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.ph__plan-price b {
  font-size: clamp(30px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ph__plan-card--featured .ph__plan-price b {
  color: var(--ph-accent-text);
}

.ph__plan-price span {
  color: var(--ph-muted);
  font-weight: 600;
}

.ph__plan-note {
  margin-top: 6px;
  color: var(--ph-muted);
  font-size: 14.5px;
}

/* The table scrolls sideways inside its own box rather than pushing the page
   wider than the phone reading it. */
.ph__compare-wrap {
  max-width: 980px;
  margin: 32px auto 0;
  overflow-x: auto;
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-radius-lg);
  background: var(--ph-panel);
  box-shadow: var(--ph-card-shadow);
}

.ph__compare {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 15px;
}

.ph__compare th,
.ph__compare td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--ph-line);
  text-align: center;
  vertical-align: middle;
}

.ph__compare tbody tr:last-child :is(th, td) {
  border-bottom: 0;
}

.ph__compare thead th {
  color: var(--ph-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ph__compare th[scope="row"],
.ph__compare thead th:first-child {
  font-weight: 600;
  text-align: left;
}

.ph__compare-pro {
  width: 22%;
  background: color-mix(in srgb, var(--ph-gold-bg) 60%, transparent);
}

.ph__compare thead .ph__compare-pro {
  color: var(--ph-gold);
}

.ph__compare thead .ph__plan-crown {
  margin-right: 4px;
  vertical-align: -2px;
}

.ph__compare td:nth-child(2) {
  width: 22%;
}

.ph__cmp-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2e9e5b;
  color: #fff;
}

.ph__cmp-yes .ph__icon {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.ph__cmp-no {
  color: var(--ph-muted);
}

.ph__cmp-text {
  color: var(--ph-ink);
  font-size: 14px;
  font-weight: 600;
}

/* =========================================================================
 * Closing band, footer, 404
 * ====================================================================== */

.ph__cta {
  position: relative;
  overflow: hidden;
  background-color: var(--ph-tint);
  background-image:
    radial-gradient(50% 80% at 50% 0%, var(--ph-glow), transparent 70%),
    linear-gradient(var(--ph-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-grid) 1px, transparent 1px);
  background-size:
    100% 100%,
    30px 30px,
    30px 30px;
  border-top: 1px solid var(--ph-line);
}

.ph__cta-seal {
  width: 76px !important;
  margin: 0 auto 18px;
  transform: rotate(-10deg);
}

.ph__footer {
  background: var(--ph-surface);
}

.ph__footer-promise {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}

.ph__footer-promise li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ph__footer-promise .ph__icon {
  width: 16px;
  height: 16px;
  color: var(--ph-accent-text);
  stroke-width: 3;
}

.ph__footer-build {
  font-size: 13.5px !important;
}

.ph__state-seal {
  width: clamp(120px, 18vw, 170px) !important;
  margin: 0 auto 26px;
  transform: rotate(-8deg);
}

/* ---- Documents: the legal pages get a paper sheet ---- */

.ph__doc-lead {
  background: var(--ph-panel);
  box-shadow: var(--ph-card-shadow);
}

.ph__toc {
  background: var(--ph-tint);
  border: 1px solid var(--ph-line);
}

.ph__prose table {
  border: 1px solid var(--ph-line);
}

.ph__prose th {
  width: 32%;
  background: var(--ph-tint);
  font-weight: 700;
}

/* =========================================================================
 * Widths — 640px is two cards side by side, 900px the desktop header and the
 * hero's two columns.
 * ====================================================================== */

@media (min-width: 640px) {
  .ph__flow,
  .ph__features,
  .ph__stats,
  .ph__tools,
  .ph__post-grid,
  .ph__methods {
    grid-template-columns: repeat(2, 1fr);
  }

  .ph__stamps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ph__plans {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph__legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 28px;
  }
}

@media (min-width: 900px) {
  .ph__hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }

  .ph__showcase-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .ph__showcase--flip .ph__showcase-copy {
    order: 2;
  }

  .ph__flow--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph__flow--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .ph__features,
  .ph__methods {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Five sections of different lengths leave a hole in a three-column grid;
     columns pack them the way a printed feature list would. */
  .ph__tools {
    display: block;
    columns: 3;
    column-gap: 16px;
  }

  .ph__tools .ph__tool {
    break-inside: avoid;
    margin-bottom: 16px;
  }

  .ph__stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (hover: hover) {
  .ph__feature,
  .ph__stamp,
  .ph__plan-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .ph__feature:hover,
  .ph__stamp:hover,
  .ph__plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ph-shadow-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph * {
    animation: none !important;
    transition: none !important;
  }
}


/* The shared filter definitions: out of layout, but not display:none — a filter
   inside a display:none subtree is not applied by every engine. */
.ph__defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Four short figures pair up even on a phone; one per row is a scroll of mostly air. */
.ph__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .ph__stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}
