*{box-sizing:border-box}
:root{--navy:#172c55;--red:#df1724;--paper:#f4efdf;--btn-bg:#0b3d74;--btn-bg-strong:#0a2d5a;--btn-text:#ffffff;--btn-soft:#eaf3ff;--btn-soft-text:#0b3d74}
body{margin:0;background:#eef1f5;color:#17233c;font-family:Arial,Helvetica,sans-serif}
.app{max-width:1450px;margin:auto;padding:24px;display:grid;grid-template-columns:minmax(300px,420px) 1fr 1fr;gap:20px;align-items:start}
.panel{background:#fff;border-radius:16px;padding:22px;box-shadow:0 8px 28px #0001;margin-bottom:25px}
h1{margin:0 0 5px}.hint{margin-top:0;color:#667085}
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
label{font-weight:700;font-size:13px}
input,textarea{display:block;width:100%;margin-top:6px;border:1px solid #d0d5dd;border-radius:8px;padding:11px;font:inherit}
textarea{min-height:76px;resize:vertical}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.btn,.btn-primary,.btn-secondary,.btn-danger,.btn-soft,button,[class*="btn"]{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:10px;padding:11px 17px;background:var(--btn-bg);color:var(--btn-text);font-weight:700;cursor:pointer;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
.btn:hover,.btn-primary:hover,.btn-secondary:hover,.btn-danger:hover,.btn-soft:hover,button:hover,[class*="btn"]:hover{filter:brightness(1.06);transform:translateY(-1px)}
.btn-primary{background:var(--btn-bg);color:var(--btn-text);box-shadow:0 8px 18px rgba(11,61,116,0.18)}
.btn-secondary{background:var(--btn-soft);color:var(--btn-soft-text);border-color:#d6e5ff}
.btn-soft{background:var(--btn-soft);color:var(--btn-soft-text);border-color:#d6e5ff}
.btn-danger{background:#dc2626;color:#fff;border-color:#b91c1c}
.secondary-btn{background:#e9edf5;color:var(--navy)}
.history-panel{margin-top:20px;padding:14px 16px;border:1px solid rgba(23,44,85,.12);border-radius:12px;background:#f7f9fc}
.history-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.history-header h3{margin:0;font-size:15px;color:var(--navy)}
.history-actions{display:flex;gap:8px;flex-wrap:wrap}
.history-list{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow:auto}
.history-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 10px;border:1px solid rgba(23,44,85,.08);border-radius:8px;background:#fff;cursor:pointer;transition:transform .12s ease,border-color .12s ease}
.history-item:hover{border-color:rgba(23,44,85,.2);transform:translateY(-1px)}
.history-main{min-width:0}
.history-id{display:block;font-weight:800;color:var(--navy);font-size:13px;word-break:break-all}
.history-meta{display:block;font-size:12px;color:#52607a}
.history-empty{padding:12px 10px;border:1px dashed rgba(23,44,85,.18);border-radius:8px;color:#52607a;background:#fff;text-align:center;font-size:13px}
.record-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:9999;visibility:visible;opacity:1;transition:opacity .18s ease}
.record-modal.hidden{visibility:hidden;opacity:0;pointer-events:none}
.record-modal-backdrop{position:absolute;inset:0;background:rgba(7,16,26,.65)}
.record-modal-dialog{position:relative;z-index:1;width:min(980px,92vw);max-height:86vh;display:flex;flex-direction:column;background:#fff;border-radius:16px;box-shadow:0 34px 80px rgba(0,0,0,.25);overflow:hidden;border:1px solid rgba(23,44,85,.1)}
.record-modal-header-actions{display:flex;align-items:center;gap:10px}
.record-modal-kicker{margin:0;color:#667085;font-size:11px;text-transform:uppercase;letter-spacing:.12em}
.record-modal-header h3{margin:4px 0 0;color:var(--navy)}
.close-modal{border:none;background:transparent;color:var(--navy);font-size:28px;line-height:1;cursor:pointer;padding:0 6px}
.record-modal-body{display:grid;grid-template-columns:minmax(220px,300px) 1fr;min-height:300px;max-height:70vh;overflow:hidden}
.record-modal-sidebar{padding:12px;background:#f8fafc;border-right:1px solid rgba(23,44,85,.08);overflow:auto}
.record-modal-list-header{font-size:12px;font-weight:800;letter-spacing:.08em;color:#667085;text-transform:uppercase;margin:0 0 8px;padding:0 4px}
.record-modal-list{display:flex;flex-direction:column;gap:8px}
.record-modal-item{width:100%;text-align:left;border:1px solid rgba(23,44,85,.08);background:#fff;border-radius:10px;padding:10px 12px;cursor:pointer;color:#172c55}
.record-modal-item.active{background:#ecf3ff;border-color:rgba(23,44,85,.2)}
.record-modal-item strong{display:block;font-size:13px;word-break:break-word}
.record-modal-item small{display:block;margin-top:4px;color:#4b5563}
.record-modal-content{padding:18px;overflow:auto;max-height:100%}
.record-detail{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:12px}
.record-field{padding:12px;border:1px solid rgba(23,44,85,.08);border-radius:10px;background:#f8fafc}
.record-field label{display:block;margin-bottom:6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#667085;font-weight:800}
.record-field div{font-size:14px;color:#172c55;line-height:1.5;word-break:break-word}
.record-field.full{grid-column:1 / -1}
.record-photo-field .record-image-box{display:flex;justify-content:center;align-items:center;min-height:190px;border:1px solid rgba(23,44,85,.08);border-radius:10px;background:#fff;overflow:hidden}
.record-photo-field img{display:block;max-width:100%;max-height:220px;object-fit:cover;border-radius:8px}
.record-image-box.empty{color:#667085;font-weight:600}
.record-edit-form{display:grid;gap:12px}
.record-edit-form input,
.record-edit-form textarea{width:100%;padding:10px 12px;border:1px solid rgba(23,44,85,.18);border-radius:8px;background:#fff;color:#172c55;font:inherit}
.record-edit-form textarea{min-height:90px;resize:vertical}
.record-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:6px}
.cards{display:flex;justify-content:center;gap:35px;align-items:flex-start;flex-wrap:wrap}
.card-wrap h2{text-align:center;font-size:13px;letter-spacing:2px;margin:0 0 10px}



/* CR80 portrait ID proportion: 53.98mm × 85.60mm = 0.6306 */
.id-card{
  position:relative;
  width:340px;
  height:539px;
  overflow:hidden;
  background:var(--paper);
  box-shadow:0 10px 30px #0003;
  border:1px solid #aaa;
  font-family:Arial,Helvetica,sans-serif;
}
.id-card:after{content:"";position:absolute;inset:0;pointer-events:none;border:2px solid #132c55;z-index:20}

.molecule-bg{
  position:absolute;inset:0;opacity:.12;
  background-image:
    radial-gradient(circle at 20% 20%,#173766 1.1px,transparent 1.4px),
    radial-gradient(circle at 65% 30%,#173766 1.1px,transparent 1.4px),
    radial-gradient(circle at 35% 65%,#173766 1.1px,transparent 1.4px),
    radial-gradient(circle at 80% 80%,#173766 1.1px,transparent 1.4px);
  background-size:48px 48px,62px 62px,55px 55px,70px 70px;
}
.top{
  position:relative;height:105px;display:flex;align-items:center;
  padding:14px 16px 9px;z-index:2;overflow:hidden
}
.logo{width:82px;height:82px;flex:0 0 82px;object-fit:contain;border-radius:50%;mix-blend-mode:multiply}
.company{min-width:0;padding-left:12px;line-height:1}
.rc{font-size:13px;font-weight:800;color:var(--red);margin-bottom:5px;
    font-family:"Helvetica Rounded", "Helvetica", cursive,}
.company-name{
  font-size:22px;font-weight:900;color:var(--red);
  letter-spacing:-1px;white-space:nowrap;line-height:1;
  font-family:"Helvetica Rounded", "Helvetica", cursive,}
.company-name{
  font-size:20px;font-weight:800;color:var(--red);font-family:'Nunito', Arial, Helvetica, sans-serif;
  letter-spacing:0.2px;white-space:nowrap;line-height:1;margin-bottom:2px
}
.tagline{font-size:12px;font-weight:700;color:#17386c;margin-top:4px;white-space:nowrap;font-family:'Nunito', Arial, Helvetica, sans-serif}

.title-band,.id-band,.services-band{
  position:relative;z-index:3;background:rgba(18,43,83,.95);color:#fff;text-align:center
}
.title-band{
  height:51px;display:flex;align-items:center;justify-content:center;
  font-size:25px;font-weight:900;letter-spacing:1px
}

/* Front-card watermark overlay */
.front-watermark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:1}
.front-watermark img{width:100%;height:100%;object-fit:cover;opacity:.20;filter:grayscale(5%) blur(0.2px) sharpness(2px) contrast(1.1) brightness(1.05)}

.photo-box{
  position:relative;z-index:2;width:190px;height:218px;margin:19px auto 13px;
  background:#213452;border:3px solid #172c55;overflow:hidden
}
.photo-box img{width:100%;height:100%;object-fit:auto;display:none}
.person-name{
  position:relative;z-index:2;text-align:center;font-size:19px;font-weight:800;
  color:#102f61;letter-spacing:.5px;white-space:nowrap;padding:0 7px;
  font-family:"Bradley Hand", "Bradley Hand ITC", cursive,}
.person-name{
  position:relative;z-index:2;text-align:center;font-size:18px;font-weight:700;
  color:#102f61;letter-spacing:.8px;white-space:nowrap;margin-top:8px;padding:0 6px;
  font-family:'Bradley Hand', cursive
}
.position{
  position:relative;z-index:2;text-align:center;color:var(--red);
  font-size:12.5px;font-weight:700;margin-top:6px;white-space:nowrap;font-family:'Bradley Hand', cursive
}
.id-band{
  height:54px;margin-top:20px;display:flex;align-items:center;
  padding:0 14px;font-size:17px;font-weight:700;text-align:left
}
.id-band .qr{
  margin-left:auto;background:#fff;padding:4px;width:77px;height:74px;
  transform:translateY(-7px);flex:0 0 72px
}
.qr img,.qr canvas{width:68px!important;height:68px!important;position:center}

/* Back */
.back{background:#fafafa}
.back-watermark{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  z-index:0;opacity:.11
}
.back-watermark img{width:285px;height:285px;object-fit:contain;border-radius:50%;mix-blend-mode:multiply}
.services-band{
  height:82px;padding:17px 13px;font-size:17px;line-height:1.3;font-weight:900
}
.return-title{
  position:relative;z-index:2;margin-top:17px;text-align:center;
  font-size:16px;font-weight:900;color:#253d6a
}
.address{
  position:relative;z-index:2;text-align:center;margin:25px 19px 0;
  font-size:14px;line-height:1.35;font-weight:800;color:#263f6d
}
.contact{
  position:absolute;z-index:2;left:12px;right:12px;bottom:103px;
  text-align:center;font-size:13.5px;line-height:1.45;font-weight:800;color:#243c68
}
.signature{
  position:absolute;z-index:2;width:132px;height:67px;object-fit:auto;
  left:104px;bottom:25px;mix-blend-mode:multiply
}
.signature-line{
  position:absolute;z-index:2;left:58px;right:58px;bottom:43px;border-bottom:1.5px solid #243c68
}
.authorized{
  position:absolute;z-index:2;left:0;right:0;bottom:22px;text-align:center;
  font-family:Georgia,serif;font-size:12px;color:#243c68
}

@media(max-width:900px){.form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){
  .app{padding:10px}.form-grid{grid-template-columns:1fr}
  .cards{gap:16px}
  .id-card{width:306px;height:485px}
  .top{height:94px;padding:12px 13px 8px}
  .logo{width:72px;height:72px;flex-basis:72px}
  .company{padding-left:9px}.company-name{font-size:19px}.rc{font-size:11px}.tagline{font-size:10.5px}
  .title-band{height:46px;font-size:21px}
  .photo-box{width:170px;height:200px;margin:22px auto 10px}
  .person-name{font-size:17px}.position{font-size:11.5px}
  .id-band{height:48px;margin-top:14px;font-size:15px}
  .id-band .qr{width:63px;height:63px;flex-basis:63px}.qr img,.qr canvas{width:55px!important;height:55px!important}
  .services-band{height:73px;font-size:15px;padding:14px 10px}
  .return-title{font-size:14px;margin-top:14px}.address{font-size:12.5px;margin-top:20px}
  .contact{font-size:11.5px;bottom:91px}.signature{width:118px;height:55px;left:94px;bottom:43px}
  .signature-line{left:52px;right:52px;bottom:39px}.authorized{font-size:10.5px;bottom:19px}
}

/* Grid fallback: two columns then single column */
@media (max-width:1100px){
  .app{grid-template-columns:minmax(300px,480px) 1fr}
  .back-preview{grid-column:1 / -1}
}

@media (max-width:700px){
  .app{display:block}
  .panel,.preview-panel{margin-bottom:14px}
}

/* Actual standard CR80 portrait print size */
@media print{
  @page{size:53.98mm 85.60mm;margin:8mm}
  html,body{margin:0;padding:0;background:#fff}
  body *{visibility:hidden}
  #print-root, #print-root *{visibility:visible}
  #print-root{
    position:static;display:block;background:#fff;padding:0;margin:0;
    width:100%;
  }
  .app, .panel, .preview-panel, .front-preview, .back-preview{display:none!important}
  .print-page{
    display:flex;justify-content:center;align-items:flex-start;
    width:100%;
    page-break-after:always;
    margin:0 0 8mm;
  }
  .print-page:last-child{page-break-after:auto}
  .print-page .id-card{
    width:53.98mm;height:85.60mm;
    box-shadow:none;border:0;transform-origin:top left;
    zoom:1;
  }
}

/* Blog + article page styles */
:root {
  --article-brand: #0b3d74;
  --article-brand-dark: #041b44;
  --article-brand-soft: #eef5ff;
  --article-ink: #132238;
  --article-muted: #5b6980;
  --article-line: #dfe7f1;
  --article-card: #ffffff;
  --article-bg: #f3f7fb;
  --article-shadow: 0 12px 30px rgba(11,61,116,0.08);
}

body.article-shell {
  margin: 0;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  background: var(--article-bg);
  color: var(--article-ink);
}

html[data-theme='dark'] {
  color-scheme: dark;
  --article-brand: #8ac6ff;
  --article-brand-dark: #0f3f7a;
  --article-ink: #eaf3ff;
  --article-muted: #a9bfd8;
  --article-line: rgba(255,255,255,0.08);
  --article-card: #0d1726;
  --article-bg: #07131d;
  --article-shadow: 0 14px 32px rgba(0,0,0,0.45);
}

html[data-theme='dark'] body.article-shell,
html[data-theme='dark'] .article-shell {
  background: var(--article-bg);
  color: var(--article-ink);
}

html[data-theme='dark'] .article-shell header,
html[data-theme='dark'] .article-shell .article-card,
html[data-theme='dark'] .article-shell .toc,
html[data-theme='dark'] .article-shell .quote-box,
html[data-theme='dark'] .article-shell footer,
html[data-theme='dark'] .article-shell .hero-strip {
  background: rgba(13, 23, 38, 0.96);
  color: var(--article-ink);
}

html[data-theme='dark'] .article-shell .article-card,
html[data-theme='dark'] .article-shell .toc,
html[data-theme='dark'] .article-shell .quote-box {
  border: 1px solid var(--article-line);
  box-shadow: var(--article-shadow);
}

html[data-theme='dark'] .article-shell a,
html[data-theme='dark'] .article-shell .site-nav a,
html[data-theme='dark'] .article-shell .hero-actions a,
html[data-theme='dark'] .article-shell .breadcrumbs a {
  color: var(--article-brand);
}

html[data-theme='dark'] .article-shell p,
html[data-theme='dark'] .article-shell li,
html[data-theme='dark'] .article-shell h1,
html[data-theme='dark'] .article-shell h2,
html[data-theme='dark'] .article-shell h3,
html[data-theme='dark'] .article-shell h4,
html[data-theme='dark'] .article-shell .meta-row,
html[data-theme='dark'] .article-shell .copy {
  color: var(--article-ink);
}

html[data-theme='dark'] .article-shell .meta-row,
html[data-theme='dark'] .article-shell .toc ul a,
html[data-theme='dark'] .article-shell .article-card,
html[data-theme='dark'] .article-shell footer,
html[data-theme='dark'] .article-shell .hero-strip {
  border-color: var(--article-line);
}

.article-shell a {
  color: var(--article-brand);
  text-decoration: none;
}

.article-shell a:hover {
  text-decoration: underline;
}
#theme-toggle.theme-toggle {
  position: fixed;
  left: auto;
  right: 18px;
  top: 110px;
  bottom: auto;
  z-index: 100001;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: #fff;
  color: #041b44;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(2,6,23,0.14);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

#theme-toggle.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2,6,23,0.18);
}

#theme-toggle.theme-toggle.dragging {
  user-select: none;
  cursor: grabbing;
}

#theme-toggle .theme-toggle-icon {
  font-size: 20px;
  line-height: 1;
}

html[data-theme='dark'] #theme-toggle.theme-toggle {
  background: linear-gradient(135deg, #2b3948, #041b44);
  color: #fff;
  border-color: rgba(255,255,255,0.08);
}

@media (max-width:640px) {
  #theme-toggle.theme-toggle {
    right: 14px;
    top: 110px;
    bottom: auto;
    width: 48px;
    height: 48px;
  }
}
.article-shell img {
  max-width: 100%;
  display: block;
}

.article-shell .container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.article-shell header {
  background: linear-gradient(135deg, var(--article-brand-dark), var(--article-brand));
}

.article-shell .header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

.article-shell .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-shell .brand img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}

.article-shell .brand h1 {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
}

.article-shell .site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.article-shell .site-nav a {
  color: rgba(255,255,255,0.96);
  font-weight: 600;
}

.article-shell .site-nav .btn {
  padding: 10px 16px;
  background: #fff;
  color: var(--article-brand-dark);
  border-radius: 999px;
}

.article-shell .hero-strip {
  background: linear-gradient(135deg, #041b44, #0b3d74);
  color: #fff;
  padding: 40px 0 18px;
}

.article-shell .hero-strip h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.article-shell .hero-strip p {
  margin: 0;
  color: rgba(255,255,255,0.85);
}

.article-shell .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.article-shell .btn-primary,
.article-shell .btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
}

.article-shell .btn-primary {
  background: #fff;
  color: var(--article-brand-dark);
}

.article-shell .btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
}

.article-shell .breadcrumbs {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 12px;
}

.article-shell .breadcrumbs a {
  color: #fff;
}

.article-shell .layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(250px, 0.78fr);
  gap: 20px;
  padding: 20px 0 34px;
  align-items: start;
}

.article-shell .article-card,
.article-shell .sidebar-box {
  background: var(--article-card);
  border: 1px solid var(--article-line);
  border-radius: 16px;
  box-shadow: var(--article-shadow);
}

.article-shell .article-card {
  padding: 22px 22px 18px;
}

.article-shell .article-card h2 {
  font-size: 1.55rem;
  margin-top: 2rem;
}

.article-shell .article-card h3 {
  font-size: 1.15rem;
  margin-top: 1.2rem;
}

.article-shell .article-card p,
.article-shell .article-card li {
  color: #334155;
  line-height: 1.8;
}

.article-shell .article-card ul,
.article-shell .article-card ol {
  padding-left: 1.2rem;
}

.article-shell .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin-top: 18px;
}

.article-shell .toc {
  background: #f8fbff;
  border: 1px solid var(--article-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px 16px;
  float: right;
  width: min(270px, 100%);
  clear: right;
  border-top: 3px solid var(--article-brand);
}

.article-shell .toc h3,
.article-shell .sidebar-box h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.article-shell .article-card {
  overflow: hidden;
}

.article-shell .toc ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.article-shell .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--article-line);
  border-radius: 12px;
}

.article-shell .table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.article-shell .table-wrap th,
.article-shell .table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--article-line);
  text-align: left;
}

.article-shell .callout {
  background: linear-gradient(135deg, #fff7de, #fff3d6);
  border-left: 4px solid #d97706;
  padding: 16px 18px;
  border-radius: 12px;
  margin-top: 20px;
}

.article-shell .faq-box {
  margin-top: 26px;
}

.article-shell .faq-item {
  padding: 16px 0;
  border-top: 1px solid var(--article-line);
}

.article-shell .sidebar {
  display: grid;
  gap: 18px;
}

.article-shell .sidebar-box {
  padding: 16px 18px;
  border-top: 3px solid var(--article-brand);
}

.article-shell .sidebar-box h3 {
  margin-top: 0;
}

.article-shell .sidebar-box ul {
  margin: 0;
  padding-left: 18px;
}

.article-shell .share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-shell .share-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--article-brand-soft);
  border: 1px solid #d6e3fb;
  font-weight: 700;
}

.article-shell .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.article-shell .related-grid a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 300px;
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  border: 1px solid rgba(11, 61, 116, 0.12);
  border-radius: 26px 26px 18px 18px;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}

.article-shell .related-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 34px rgba(15, 23, 42, 0.12);
  text-decoration: none;
}

.article-shell .related-grid a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, #b7d5f5 0%, #a9d4ff 100%);
  border-radius: 26px 26px 0 0;
  border-bottom: 1px solid rgba(11, 61, 116, 0.08);
}

.article-shell .related-grid a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #f8f8f8 0%, #efefef 58%, #e0e0e0 100%);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  box-shadow: -16px 16px 26px rgba(17, 24, 39, 0.08);
}

.article-shell .related-grid strong,
.article-shell .related-grid a div {
  position: relative;
  z-index: 1;
}

.article-shell .related-grid strong {
  display: block;
  margin: 0;
  padding: 18px 18px 12px;
  color: #0c2345;
  line-height: 1.35;
  min-height: 118px;
  background: transparent;
}

.article-shell .related-grid a div {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 18px 18px;
  color: #4f5d73;
  line-height: 1.55;
  font-size: 0.92rem;
  border-top: 1px solid rgba(11, 61, 116, 0.08);
}

.article-shell footer {
  background: var(--article-brand-dark);
  color: rgba(255,255,255,0.9);
  padding: 28px 0 18px;
  text-align: center;
}

.article-shell .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  text-align: center;
  align-items: start;
}

.article-shell .footer-grid h4 {
  color: #fff;
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-shell .footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  text-align: center;
}

.article-shell .footer-grid a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

.article-shell .copy {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  text-align: center;
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  .article-shell .layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .article-shell .header-wrap { flex-direction: column; align-items: flex-start; }
  .article-shell .site-nav { width: 100%; justify-content: flex-start; }
  .article-shell .article-card { padding: 18px; }
}
