html:has(#shagmaJournal), body:has(#shagmaJournal), #allrecords:has(#shagmaJournal) { background:#252525; }
.jn {
  --jn-text:#f2eee8; --jn-muted:rgba(242,238,232,.68); --jn-field:#3a3a3a;
  color:var(--jn-text); background:#252525; font-family:"IBM Plex Serif",serif; font-size:16px;
  padding:calc(128px + env(safe-area-inset-top)) env(safe-area-inset-right) 64px env(safe-area-inset-left);
  -webkit-text-size-adjust:100%;
}
.jn *, .jn *::before, .jn *::after { box-sizing:border-box; }
.jn [hidden] { display:none !important; }
.jn h1, .jn h2, .jn h3, .jn p, .jn figure { margin:0; }
.jn a { color:inherit; }
.jn button, .jn input, .jn textarea { font:inherit; }
.jn button { cursor:pointer; -webkit-tap-highlight-color:transparent; }
.jn button:disabled { cursor:default; }
.jn :focus-visible { outline:1px solid #d8d2c8; outline-offset:4px; }
.jn-wrap { width:min(1240px,calc(100% - 96px)); margin:auto; }
.jn-heading { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; gap:20px; margin-bottom:16px; }
.jn h1 { font-size:clamp(30px,3vw,40px); font-weight:300; line-height:1.1; letter-spacing:.06em; text-transform:uppercase; }
/* Button values match the current consultation button. */
.jn .jn-button {
  display:inline-flex; align-items:center; justify-content:center; gap:10px; flex-shrink:0;
  max-width:100%; min-height:50px; padding:12px 30px; border-radius:999px;
  border:1px solid rgba(216,210,200,.22); background:rgba(216,210,200,.08); color:var(--jn-text);
  font-family:"IBM Plex Serif",serif; font-size:12px; line-height:1.4; letter-spacing:.16em;
  text-transform:uppercase; text-decoration:none; text-align:center;
  transition:transform .22s ease,background .22s ease,border-color .22s ease;
}
.jn .jn-button--primary:not(:disabled) { border-color:rgba(216,115,42,.8); }
.jn .jn-button:hover:not(:disabled) { transform:translateY(-2px); background:rgba(216,210,200,.14); }
.jn .jn-button:disabled { opacity:.4; }
.jn-heading > .jn-button { justify-self:end; min-height:44px; padding:10px 24px; }
.jn-filters { display:flex; width:max-content; max-width:100%; gap:4px; padding:3px; border:1px solid rgba(216,210,200,.22); border-radius:999px; margin-bottom:16px; }
.jn-filters button { border:1px solid transparent; border-radius:999px; background:transparent; color:var(--jn-muted); min-height:36px; padding:7px 24px; font-size:13px; }
.jn-filters button[aria-pressed="true"] { background:rgba(216,210,200,.12); border-color:rgba(216,210,200,.3); color:var(--jn-text); }
.jn-news { margin-bottom:clamp(28px,4svh,44px); }
.jn-news-controls { display:grid; grid-template-columns:40px auto 40px; align-items:center; justify-self:center; gap:8px; }
.jn-news-regions { display:flex; flex-shrink:0; padding:3px; gap:2px; border:1px solid rgba(216,210,200,.22); border-radius:999px; }
.jn-news-regions button { min-height:32px; padding:5px 18px; border:1px solid transparent; border-radius:999px; background:transparent; color:var(--jn-muted); font-size:12px; }
.jn-news-regions button[aria-pressed="true"] { background:rgba(216,210,200,.12); border-color:rgba(216,210,200,.3); color:var(--jn-text); }
.jn-news-track { list-style:none; display:flex; gap:20px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; margin:0; padding:0; scrollbar-width:none; }
.jn-news-track::-webkit-scrollbar { display:none; }
.jn-news-track li { display:flex; flex:0 0 calc((100% - 40px)/3); min-width:0; scroll-snap-align:start; border:1px solid rgba(216,210,200,.18); border-radius:20px; background:linear-gradient(180deg,#2d2d2d,#292929); }
.jn-news-track a { display:flex; align-items:center; gap:12px; width:100%; min-width:0; padding:12px; text-decoration:none; border-radius:20px; }
.jn-news-track a:focus-visible { outline-offset:-1px; }
.jn-news-track a:hover .jn-news-title { color:#d8d2c8; text-decoration:underline; text-underline-offset:4px; }
.jn-news-thumb { position:relative; display:block; flex:0 0 60px; width:60px; height:60px; overflow:hidden; border-radius:12px; border:1px solid rgba(216,210,200,.13); background:linear-gradient(135deg,#3a3a3a,#292929); }
.jn-news-thumb::before { content:"Архи.ру"; position:absolute; inset:0; display:grid; place-items:center; color:var(--jn-muted); font-size:11px; }
.jn-news-thumb img { position:relative; display:block; width:100%; height:100%; object-fit:cover; }
.jn-news-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:4px; }
.jn-news-title { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:15px; font-weight:300; line-height:1.35; overflow-wrap:anywhere; }
.jn-news-track .jn-meta { font-size:11px; }
.jn-news-track time { display:none; }
.jn-news-message { padding:18px 0 4px; color:var(--jn-muted); font-family:"IBM Plex Sans",Arial,sans-serif; font-size:13px; line-height:1.5; }
.jn-news-arrow { display:grid; place-items:center; width:40px; height:40px; padding:0; border:1px solid rgba(216,210,200,.22); border-radius:50%; background:transparent; color:var(--jn-text); }
.jn-news-arrow:disabled { opacity:.35; }
.jn-news-arrow:hover:not(:disabled) { background:rgba(216,210,200,.12); }
.jn-news-arrow svg { width:16px; height:16px; stroke:currentColor; stroke-width:1.1; stroke-linecap:round; stroke-linejoin:round; }
.jn-feed { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:minmax(320px,calc(100svh - 394px)); gap:40px 20px; }
.jn-card { border:1px solid rgba(216,210,200,.13); border-radius:24px; overflow:hidden; background:linear-gradient(180deg,#303030,#2b2b2b); }
.jn-card img { display:block; width:100%; height:100%; min-height:0; object-fit:cover; object-position:center 65%; }
.jn-card details { height:100%; }
.jn-card summary { list-style:none; cursor:pointer; display:grid; grid-template-rows:minmax(0,1fr) auto; height:100%; }
.jn-card details[open] summary { height:auto; }
.jn-card summary::-webkit-details-marker { display:none; }
.jn-card-content { padding:16px; display:flex; flex-direction:column; flex:1; gap:14px; }
.jn-meta { display:flex; flex-wrap:wrap; align-items:center; gap:12px; color:var(--jn-muted); font-family:"IBM Plex Sans",Arial,sans-serif; font-size:12px; line-height:1.5; }
.jn-card h2 { min-height:78px; font-size:20px; font-weight:300; line-height:1.3; overflow-wrap:anywhere; }
.jn-card-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:auto; }
.jn-card-footer time { display:none; }
.jn-card .jn-button { min-height:40px; padding:8px 20px; font-size:11px; }
.jn-card summary:hover .jn-button { border-color:rgba(216,115,42,.8); }
.jn-card [data-body] { padding:0 26px 26px; }
.jn-more { margin:32px auto 0; }
.jn .jn-more { display:flex; }
.jn-empty { min-height:320px; border:1px solid rgba(216,210,200,.13); border-radius:32px; padding:64px 32px; background:linear-gradient(180deg,#2b2b2b,#252525); text-align:center; display:flex; flex-direction:column; justify-content:center; align-items:center; }
.jn-empty h2 { font-weight:300; font-size:28px; line-height:1.4; }
.jn-empty p { max-width:580px; margin-top:20px; color:var(--jn-muted); font-size:16px; line-height:1.75; }
.jn-filter-empty { padding:60px 0; color:var(--jn-muted); text-align:center; }
.jn-reader { max-width:820px; margin:auto; }
.jn-reader h1 { text-transform:none; letter-spacing:0; margin:24px 0 36px; overflow-wrap:anywhere; }
.jn-reader .jn-meta { margin-top:44px; }
.jn-reader figure { margin:32px 0; }
.jn-reader img, .jn-reader video { display:block; max-width:100%; width:100%; height:auto; border-radius:24px; }
.jn-reader-end { margin-top:40px; }
.jn-reader [data-body] { font-family:"IBM Plex Sans",Arial,sans-serif; font-size:18px; line-height:1.85; overflow-wrap:anywhere; }
.jn-reader [data-body] p { margin:22px 0; }
.jn-reader [data-body] h2, .jn-reader [data-body] h3 { font-family:"IBM Plex Serif",serif; font-weight:300; line-height:1.4; margin:36px 0 16px; }
.jn-reader [data-body] a { color:#d8732a; text-underline-offset:4px; }
.jn-reader figcaption { color:var(--jn-muted); font-size:13px; margin-top:12px; }
.jn-dialog {
  position:fixed; inset:0 0 0 auto; margin:0; width:min(640px,100%); max-width:100%; height:100%; height:100dvh; max-height:100%;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  color:var(--jn-text); border:0; border-left:1px solid rgba(242,238,232,.13);
  background:linear-gradient(180deg,#333,#2f2f2f); overflow:hidden;
  font-family:"IBM Plex Serif",serif;
}
.jn-dialog[open] { display:flex; flex-direction:column; }
.jn-dialog::backdrop { background:rgba(0,0,0,.42); }
.jn-dialog-bar { display:flex; justify-content:flex-end; padding:12px 22px 0; flex:0 0 68px; }
.jn-close { width:56px; height:56px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; background:transparent; color:#f2f1ed; }
.jn-close svg { width:22px; height:22px; display:block; }
.jn-close svg line { stroke:currentColor; stroke-width:1.1; stroke-linecap:round; }
.jn-close:hover { filter:drop-shadow(0 0 5px rgba(255,255,255,.3)); }
.jn-form-scroll { overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:rgba(216,210,200,.3) transparent; flex:1; min-height:0; }
.jn-form-scroll::-webkit-scrollbar { width:3px; }
.jn-form-scroll::-webkit-scrollbar-thumb { background:rgba(216,210,200,.3); border-radius:4px; }
.jn-form { display:flex; flex-direction:column; gap:28px; padding:28px 42px 40px; }
.jn-form-heading h2 { font-size:30px; font-weight:300; line-height:1.3; }
.jn-form-heading p { color:var(--jn-muted); font-family:"IBM Plex Sans",Arial,sans-serif; font-size:14px; line-height:1.65; margin-top:14px; }
.jn-zone { position:relative; display:grid; gap:14px; padding:20px 16px; margin:0 -16px; }
/* Identical crisp, fading corner strokes to the approved consultation form. */
.jn-zone::before,.jn-zone::after { content:""; position:absolute; box-sizing:border-box; width:90%; height:88px; pointer-events:none; border:1px solid rgba(242,238,232,.45); border-right:0; border-bottom:0; border-top-left-radius:28px; mask-image:linear-gradient(to right,#000 0,#000 75%,transparent 100%),linear-gradient(to bottom,#000 0,#000 28px,transparent 64px); mask-size:calc(100% - 28px) 2px,29px 100%; mask-position:28px 0,0 0; mask-repeat:no-repeat; }
.jn-zone::before { top:0; left:0; }
.jn-zone::after { right:0; bottom:0; transform:rotate(180deg); }
.jn-input { width:100%; min-width:0; padding:14px 18px; border:1px solid rgba(216,210,200,.16); border-radius:22px; background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.02)),var(--jn-field); color:var(--jn-text); font-family:"IBM Plex Serif",serif; font-size:16px; line-height:1.4; outline:none; appearance:none; transition:border-color .2s,box-shadow .2s; }
.jn-input:focus { border-color:rgba(216,210,200,.34); box-shadow:0 0 0 1px rgba(216,210,200,.10),0 0 0 4px rgba(216,210,200,.06); outline:none; }
.jn-input::placeholder { color:rgba(242,238,232,.54); opacity:1; }
.jn textarea.jn-input { resize:vertical; min-height:150px; max-height:50vh; display:block; }
.jn-helper { font-family:"IBM Plex Sans",Arial,sans-serif; color:var(--jn-muted); font-size:12px; line-height:1.6; margin-top:12px !important; }
.jn-files { list-style:none; padding:0; margin:14px 0 0; }
.jn-files:empty { display:none; }
.jn-files li { display:flex; align-items:center; gap:12px; border-bottom:1px solid rgba(216,210,200,.13); padding:5px 0; font-family:"IBM Plex Sans",Arial,sans-serif; font-size:13px; }
.jn-files span { flex:1; overflow-wrap:anywhere; min-width:0; }
.jn-files small { color:var(--jn-muted); display:block; margin-top:4px; }
.jn-files .jn-close { width:44px; height:44px; flex-shrink:0; }
.jn-form-actions { display:grid; gap:16px; }
.jn-consent { display:flex; align-items:flex-start; gap:10px; font-family:"IBM Plex Sans",Arial,sans-serif; color:var(--jn-muted); font-size:12px; line-height:1.6; cursor:pointer; }
.jn-consent input { appearance:none; flex:0 0 20px; width:20px; height:20px; margin:0; border:1px solid #d8d2c8; border-radius:5px; background:transparent; position:relative; cursor:pointer; }
.jn-consent input:checked { background:#d8d2c8; }
.jn-consent input:checked::after { content:''; position:absolute; left:6px; top:2px; width:5px; height:10px; border:solid #2b2b2b; border-width:0 2px 2px 0; transform:rotate(45deg); }
.jn-consent a { color:#d8732a; text-decoration:none; }
.jn-status { font-family:"IBM Plex Sans",Arial,sans-serif; font-size:13px; line-height:1.6; color:var(--jn-text); }
.jn-form-actions .jn-button { width:190px; }
.jn-dialog.is-sent { background:radial-gradient(ellipse at 45% 35%,rgba(84,152,107,.45),transparent 65%),linear-gradient(145deg,#254f3b,#142a20); }
.jn-success { min-height:100%; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:32px; }
.jn-success h2 { font-size:32px; font-weight:300; }
.jn-success p { margin-top:20px; font-family:"IBM Plex Sans",Arial,sans-serif; font-size:16px; line-height:1.7; }
.jn-sr { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width:980px) {
  .jn-wrap { width:calc(100% - 40px); }
  .jn-feed { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:auto; gap:20px; }
  .jn-card summary { display:flex; flex-direction:column; }
  .jn-card img { height:156px; }
  .jn-news-track li { flex-basis:calc((100% - 20px)/2); }
}
@media (max-width:600px) {
  .jn { padding-top:calc(104px + env(safe-area-inset-top)); padding-bottom:32px; }
  .jn-wrap { width:calc(100% - 32px); }
  .jn-heading { grid-template-columns:minmax(0,1fr) auto; gap:12px; margin-bottom:12px; }
  .jn-heading h1 { font-size:28px; }
  .jn-heading > .jn-button { justify-self:end; min-height:44px; padding:10px 12px; font-size:10px; letter-spacing:.08em; }
  .jn-news { margin-bottom:24px; }
  .jn-news-controls { grid-row:2; grid-column:1 / -1; width:100%; grid-template-columns:44px auto 44px; justify-items:center; }
  .jn-heading > .jn-button { grid-row:1; grid-column:2; }
  .jn-news-regions button { min-height:36px; padding-inline:16px; }
  .jn-news-arrow { width:44px; height:44px; }
  .jn-news-track { gap:20px; }
  .jn-news-track li { flex-basis:100%; }
  .jn-news-track a { gap:10px; }
  .jn-news-thumb { flex-basis:56px; width:56px; height:56px; }
  .jn-filters { width:100%; gap:0; margin-bottom:12px; }
  .jn-filters button { flex:1; min-width:0; padding:7px 6px; font-size:13px; }
  .jn-feed { grid-template-columns:1fr; gap:12px; }
  .jn-card { border-radius:20px; }
  .jn-card summary { display:grid; grid-template-rows:auto auto; grid-template-columns:72px minmax(0,1fr); gap:8px 12px; padding:12px; }
  .jn-card img { width:72px; height:72px; border-radius:12px; }
  .jn-card-content { display:contents; }
  .jn-card h2 { min-height:0; align-self:center; font-size:17px; line-height:1.35; }
  .jn-card-footer { grid-column:1 / -1; }
  .jn-card .jn-button { min-height:40px; padding:8px 20px; }
  .jn-empty { padding:40px 24px; min-height:300px; border-radius:28px; }
  .jn-empty h2 { font-size:25px; }
  .jn-empty p { font-size:15px; }
  .jn-reader [data-body] { font-size:16px; line-height:1.8; }
  .jn-reader h1 { font-size:32px; }
  .jn-dialog-bar { flex-basis:56px; padding:0 10px; }
  .jn-form { padding:16px 24px 30px; gap:24px; }
  .jn-zone { margin:0 -10px; padding:16px 10px; gap:12px; }
  .jn-form-heading h2 { font-size:27px; }
  .jn-form-actions .jn-button { width:100%; }
  .jn-attachments > .jn-button { width:100%; padding-inline:12px; }
}
@media (max-width:360px) {
  .jn-heading h1 { font-size:26px; }
  .jn-heading > .jn-button { padding-inline:10px; letter-spacing:.06em; }
}
@media (prefers-reduced-motion:reduce) {
  .jn .jn-button { transition:none; }
  .jn .jn-button:hover:not(:disabled) { transform:none; }
}
