/* Shared redesign metrics for pricing and local account dialog. */
:root {
  --plan-gap: 16px;
  --plan-padding: 24px;
  --plan-radius: 14px;
  --plan-price-size: 36px;
  --plan-label-size: 18px;
  --plan-note-size: 14px;
  --plan-content-width: 800px;
  --dialog-width: 420px;
  --dialog-backdrop: #17191d66;
}
.page-home #pricing .section-head { text-align: center; }
.page-home #pricing .section-head p { max-width: 680px; margin-inline: auto; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--plan-gap); max-width: var(--plan-content-width); margin-inline: auto; }
.plan-card { display: flex; flex-direction: column; align-items: center; padding: var(--plan-padding); border: 1px solid var(--color-border); border-radius: var(--plan-radius); background: var(--color-surface); text-align: center; }
.plan-card h3 { margin: 0 0 var(--plan-gap); font-size: var(--plan-label-size); }
.plan-card .plan-price { margin: 0; color: var(--color-ink); font-size: var(--plan-price-size); font-weight: 750; line-height: 1.2; white-space: nowrap; }
.plan-price span { font-size: .65em; font-weight: 550; }
.plan-card .plan-period { margin: 6px 0 var(--plan-padding); font-size: var(--plan-note-size); color: var(--color-muted); }
.plan-card .button { width: 100%; min-height: 44px; margin-top: auto; }
.plans-note { max-width: var(--plan-content-width); margin: var(--plan-padding) auto 0; color: var(--color-muted); font-size: var(--plan-note-size); line-height: 1.6; text-align: center; }
.redesign-dialog { width: min(var(--dialog-width), calc(100% - 32px)); padding: var(--plan-padding); border: 1px solid var(--color-border); border-radius: var(--plan-radius); color: var(--color-ink); background: var(--color-surface); }
.redesign-dialog::backdrop { background: var(--dialog-backdrop); }
.redesign-dialog h2 { font-size: 24px; margin: 0 0 var(--plan-gap); }
.redesign-dialog p { color: var(--color-muted); line-height: 1.6; }
.redesign-dialog .button { min-height: 44px; }
@media (max-width: 600px) {
  .plans-grid { --plan-gap: 10px; --plan-padding: 16px; --plan-price-size: 30px; --plan-label-size: 16px; }
  .plan-card .button { padding-inline: 10px; font-size: 14px; }
}
@media (max-width: 420px) {
  .plans-grid { grid-template-columns: 1fr; }
  .plan-card { display: grid; grid-template-columns: 1fr auto; text-align: left; column-gap: var(--plan-gap); }
  .plan-card h3 { margin-bottom: 6px; }
  .plan-card .plan-price { grid-column: 1; grid-row: 2; }
  .plan-card .plan-period { grid-column: 1; margin: 6px 0 0; }
  .plan-card .button { grid-column: 2; grid-row: 1 / 4; margin: 0; }
}
/* Compact navigation popover, anchored to the header without moving the page. */
:root {
  --menu-width: 292px;
  --menu-inset: 10px;
  --menu-gap: 4px;
  --menu-icon-size: 34px;
  --menu-shadow: 0 16px 44px #3024401f;
}
.menu-item-icon { display: none; }
@media (max-width: 800px) {
  .site-header .nav { position: relative; }
  .site-header .nav-links {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
    width: min(var(--menu-width), 100%); max-height: calc(100dvh - 96px); overflow-y: auto;
    flex-basis: auto; gap: var(--menu-gap); padding: var(--menu-inset);
    border: 1px solid var(--color-border); border-radius: var(--plan-radius);
    background: var(--color-surface); box-shadow: var(--menu-shadow);
  }
  .site-header .nav-links > a:not(.button) {
    display: flex; align-items: center; gap: 12px; min-height: 48px;
    padding: 8px 10px; border-radius: 8px; font-size: 15px; font-weight: 550;
    color: var(--color-ink); text-decoration: none;
  }
  .site-header .nav-links > a:not(.button):hover,
  .site-header .nav-links > a:not(.button):focus-visible { background: var(--color-surface-subtle); }
  .menu-item-icon { display: inline-flex; flex: 0 0 var(--menu-icon-size); height: var(--menu-icon-size); align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-muted); }
  .site-header .nav-links .button { min-height: 44px; margin-top: 8px; width: 100%; }
  .site-header .menu-toggle { position: relative; min-width: 44px; min-height: 44px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
  .site-header .menu-toggle[aria-expanded="true"] { border-color: var(--color-accent); background: var(--color-surface-subtle); }
  .menu-toggle[aria-expanded="true"] svg { visibility: hidden; }
  .menu-toggle[aria-expanded="true"]::before,
  .menu-toggle[aria-expanded="true"]::after { content: ''; position: absolute; width: 20px; height: 2px; background: currentColor; border-radius: 2px; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(45deg); }
  .menu-toggle[aria-expanded="true"]::after { transform: translate(-50%, -50%) rotate(-45deg); }
}
/* The guide list now provides the page's primary heading. */
.blog-list-title { --blog-title-size: 38px; max-width: none; margin: 0; font-size: var(--blog-title-size); font-weight: 700; line-height: 1.18; color: var(--ru-ink); }
@media (max-width: 800px) { .blog-list-title { --blog-title-size: 32px; } }
@media (max-width: 560px) { .blog-list-title { --blog-title-size: 28px; } }
/* Story gallery: portrait covers and centered playback, following the reference. */
:root { --story-gallery-width: 720px; --story-card-radius: 22px; --story-gallery-gap: 20px; --story-play-size: 72px; --story-cover-ink: #fff; --story-cover-shade: #10121666; }
.story-results { max-width: var(--story-gallery-width); }
.story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--story-gallery-gap); }
.story-card { border-radius: var(--story-card-radius); box-shadow: none; background: transparent; border: 0; overflow: visible; }
.story-preview { border: 1px solid var(--color-border-strong); border-radius: var(--story-card-radius); isolation: isolate; }
.story-preview::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(var(--story-cover-shade), transparent 25%, transparent 75%, var(--story-cover-shade)); }
.story-preview > img, .story-preview > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-preview > video { pointer-events: none; }
.story-card-label { position: absolute; z-index: 2; left: 18px; top: 18px; color: var(--story-cover-ink); font-size: 10.8px; font-weight: 600; letter-spacing: .1em; text-shadow: 0 1px 5px #0008; }
.story-play { z-index: 2; top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: var(--story-play-size); height: var(--story-play-size); border-radius: 50%; border: 2px solid #ffffff88; background: var(--story-cover-shade); backdrop-filter: blur(8px); }
.story-play .story-icon { width: 30px; height: 30px; }
.story-video-placeholder { z-index: 2; padding: 18px; align-items: end; font-size: 12px; text-align: center; background: transparent; }
.story-card > .story-download { width: 100%; margin: 8px 0 0; background: transparent; color: var(--color-muted); font-weight: 500; }
.story-card > .story-download .story-icon { filter: none; opacity: .65; }
.story-viewer { border-radius: var(--story-card-radius); }
@media (max-width: 599px) { .story-grid { --story-gallery-gap: 12px; --story-card-radius: 18px; --story-play-size: 54px; } .story-card-label { top: 12px; left: 12px; font-size: 9px; } .story-play .story-icon { width: 24px; height: 24px; } }
/* Viewer navigation keeps the bottom native video controls available. */
.story-progress { position: absolute; z-index: 5; top: 0; left: 12px; right: 12px; display: flex; gap: 4px; }
.story-progress-segment { position: relative; flex: 1; min-width: 0; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.story-progress-segment::before, .story-progress-segment > span { position: absolute; top: 12px; left: 0; height: 3px; border-radius: 3px; }
.story-progress-segment::before { content: ''; width: 100%; background: #ffffff55; }
.story-progress-segment > span { background: #fff; }
.story-progress-segment[aria-current="step"]::before { background: #ffffff99; }
.story-viewer-position { position: absolute; z-index: 4; top: 30px; left: 16px; right: 64px; margin: 0; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 5px #000; pointer-events: none; }
.story-viewer .story-viewer-close { --story-close-scale: .7; z-index: 5; top: 28px; width: calc(42px * var(--story-close-scale)); height: calc(42px * var(--story-close-scale)); padding: 0; border-radius: 50%; background: transparent; }
.story-viewer-close .story-icon { width: calc(19px * var(--story-close-scale)); height: calc(19px * var(--story-close-scale)); }
.story-navigation { position: absolute; z-index: 3; top: 76px; bottom: 126px; width: 32%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.story-navigation-previous { left: 0; }
.story-navigation-next { right: 0; }
.story-navigation:disabled { cursor: default; pointer-events: none; }
.story-navigation:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.story-progress-segment:focus-visible { outline: none; }
.story-progress-segment:focus-visible::before { box-shadow: 0 0 0 2px #7852b5; }

/* Publication time shares the story cover inset and stays above the shading. */
.story-preview, .story-viewer-media { --story-date-inset: 18px; --story-date-size: 10px; }
.story-date { position: absolute; z-index: 2; left: var(--story-date-inset); bottom: calc(var(--story-date-inset) - 4px); max-width: calc(100% - 2 * var(--story-date-inset)); color: #fff; font-size: var(--story-date-size); white-space: nowrap; font-weight: 400; line-height: 1.4; text-align: left; text-shadow: 0 1px 5px #000; pointer-events: none; }
.story-date-viewer { bottom: calc(var(--story-date-inset) - 4px); padding: 3px 6px; border-radius: 4px; background: #0006; }
@media (max-width: 599px) { .story-preview, .story-viewer-media { --story-date-inset: 12px; --story-date-size: clamp(7px, 1.7vw, 8px); } }

.story-preview:has(.story-date) .story-video-placeholder { padding-bottom: 56px; }

/* Keep video publication time below the native seek bar. */
.story-viewer-media:has(> video) .story-date-viewer { bottom: 1px; }

/* Shared account prototype and FAQ disclosure control. */
.account-dialog { box-sizing:border-box; width:min(420px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; padding:28px; border:1px solid #e4dcee; border-radius:24px; background:#fcfaff; color:#302641; box-shadow:0 24px 80px #30264130; }
.account-dialog::backdrop { background:#30264170; backdrop-filter:blur(5px); }
.account-dialog h2 { font-size:25px; margin:14px 0 8px; }
.account-dialog-message { font-size:14px; color:#726780; }
.account-close { position:absolute; right:12px; top:10px; width:36px; height:36px; border:0; background:transparent; color:#726780; font-size:27px; }
.account-tabs { display:flex; gap:4px; padding:4px; margin:22px 0; background:#eee5f7; border-radius:12px; }
.account-tabs button { flex:1; padding:10px; border:0; border-radius:9px; background:transparent; color:#726780; }
.account-tabs button[aria-pressed="true"] { background:#fff; color:#68468e; box-shadow:0 2px 7px #3026410b; }
.account-form { display:grid; gap:16px; }
.account-form label { display:grid; gap:7px; font-size:13px; font-weight:600; }
.account-form input { box-sizing:border-box; width:100%; padding:12px; border:1px solid #dcd0e7; border-radius:10px; background:#fff; font:inherit; font-size:16px; }
.account-form .account-submit { width:100%; background:#7954bd; color:#fff; border:0; border-radius:10px; padding:12px; }
.account-status { font-size:12px; color:#726780; line-height:1.5; margin:0; }
body .faq details summary { padding-right:34px; }
body .faq details summary::after { content:''; width:8px; height:8px; border-right:1.8px solid #8a6baa; border-bottom:1.8px solid #8a6baa; right:7px; top:50%; transform:translateY(-70%) rotate(45deg); font-size:0; }
body .faq details[open] summary::after { content:''; transform:translateY(-20%) rotate(225deg); }

/* Account: a quiet, branded welcome panel. */
dialog.account-dialog { padding:28px; width:min(400px,calc(100vw - 28px)); background:#fcfaff; border:1px solid #e7dbf0; border-radius:26px; color:#302641; }
.account-dialog .account-welcome { display:flex; align-items:center; gap:12px; margin:4px 0 22px; }
.account-welcome span { max-width:125px; color:#9275aa; font-size:10px; letter-spacing:1.5px; line-height:1.6; }
.account-dialog h2 { font-size:27px; letter-spacing:-.7px; line-height:1.15; margin:0 0 10px; }
.account-dialog .account-dialog-message { margin:0; font-size:14px; line-height:1.5; color:#84738f; }
.account-dialog .account-close { top:12px; right:12px; border-radius:50%; background:#f0e9f6; width:30px; height:30px; font-size:22px; line-height:1; }
.account-dialog .account-tabs { margin:24px 0 20px; padding:4px; background:#eee6f5; border:1px solid #e6dbee; }
.account-dialog .account-tabs button { font:inherit; font-size:13px; font-weight:600; min-height:38px; }
.account-dialog .account-tabs button[aria-pressed="true"] { background:#fff; color:#6f4e93; }
.account-dialog .account-form { gap:16px; }
.account-dialog .account-form label { color:#65536f; font-size:12px; gap:8px; }
.account-dialog .account-form input { min-height:46px; padding:12px 14px; border:1px solid #dfd3e9; background:#fff; border-radius:12px; box-shadow:0 2px 5px #30264103; }
.account-dialog .account-form input::placeholder { color:#b1a6b9; font-size:14px; }
.account-dialog .account-form input:focus { outline:3px solid #7954bd18; border-color:#a789c8; }
.account-dialog .account-form .account-submit { min-height:46px; margin-top:4px; background:#7954bd; border-radius:12px; box-shadow:0 6px 15px #7954bd20; font-size:14px; font-weight:600; }
.account-dialog .account-status { text-align:center; font-size:11px; color:#9a8ba5; line-height:1.5; }
@media(max-width:360px) { dialog.account-dialog { padding:22px; } .account-dialog h2 { font-size:25px; } }

.account-dialog .account-welcome { margin:4px 0 18px; gap:10px; }
.account-dialog .account-welcome img { width:34px; height:34px; }
.account-dialog .account-welcome span { max-width:none; font-size:15px; font-weight:600; letter-spacing:0; color:#655078; line-height:1.3; }

@media(max-width:800px){.site-header .nav-links{width:min(248px,100%);padding:6px;border-radius:12px}.site-header .nav-links>a:not(.button){min-height:40px;font-size:13px;padding:7px 10px;gap:10px}.site-header .menu-item-icon{width:20px;height:20px;flex-basis:20px;border:0;background:none}.site-header .nav-links>a>svg{width:18px;height:18px;flex:none}.site-header .nav-links .button{min-height:36px;font-size:13px;padding:8px 10px;gap:8px;margin-top:4px}.site-header .menu-toggle{min-width:36px;min-height:36px;width:36px;height:36px;padding:6px}}

.public-account-shortcut{display:none}@media(max-width:800px){.public-account-shortcut{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--color-border);border-radius:9px;color:var(--color-accent);background:var(--color-surface)}}

@media(max-width:800px){
 .site-header .nav-links{width:min(200px,calc(100vw - 32px));padding:6px}
 .site-header .nav-links>a,.site-header .nav-links>a.button,.site-header .nav-links>a:not(.button){display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;justify-content:start;gap:10px;padding:8px 10px;min-height:40px;text-align:left;line-height:1.3}
 .site-header .nav-links .menu-item-icon{position:static!important;display:grid!important;place-items:center;width:24px;height:24px;margin:0;transform:none;border:0}
 .site-header .nav-links .menu-item-icon svg{position:static!important;display:block!important;width:19px;height:19px;margin:0;transform:none}
 .site-header .nav-links .menu-item-label{position:static;display:block;min-width:0;margin:0;transform:none;white-space:normal}
 .public-account-shortcut{display:none!important}
}

@media(max-width:800px){body .site-header .nav .nav-links{width:200px;max-width:calc(100vw - 32px);box-sizing:border-box}}
