/* ============================================================
   高才香港通 · 订阅页皮肤  (Listmonk public pages)
   注入位置：settings.appearance.public.custom_css
   作用页：/subscription/form  /subscription/optin/*  /subscription/manage  /archive
   设计令牌与主站一致：品牌红 #f1404b（仅大字/小元素）、深红 #c92836（按钮）、蓝 #2f6fb0
   ============================================================ */

:root {
  --gc-brand: #f1404b;
  --gc-brand-deep: #c92836;
  --gc-blue: #2f6fb0;
  --gc-ink: #1f2329;
  --gc-ink-2: #5b6572;
  --gc-ink-3: #8b939e;
  --gc-line: #e8eaee;
  --gc-bg: #f4f6f9;
  --gc-radius: 14px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--gc-bg);
  color: var(--gc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK",
    "Hiragino Sans GB", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
  padding: 0 16px;
}

/* ---------- 卡片 ---------- */
.container {
  max-width: 600px;
  margin: 0 auto;
}

.wrap {
  background: #fff;
  border-radius: var(--gc-radius);
  padding: 34px 32px 30px;
  margin: 40px auto 18px;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .05), 0 12px 32px rgba(31, 35, 41, .07);
  box-sizing: border-box;
}

/* ---------- 顶部 logo ---------- */
.header {
  border-bottom: 1px solid var(--gc-line);
  padding-bottom: 18px;
  margin-bottom: 24px;
  text-align: center;
}

.header .logo img {
  max-height: 48px;
  width: auto;
  height: auto;
}

/* ---------- 标题：左侧品牌红竖条 ---------- */
h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--gc-ink);
  margin: 0 0 18px;
  padding-left: 13px;
  border-left: 4px solid var(--gc-brand);
  line-height: 1.35;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 10px;
}

p {
  margin: 0 0 14px;
  color: var(--gc-ink-2);
}

/* ---------- 表单 ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gc-ink-2);
  margin-bottom: 7px;
  letter-spacing: .2px;
}

input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d8dde5;
  border-radius: 9px;
  font-size: 15px;
  font-family: inherit;
  color: var(--gc-ink);
  background: #fbfcfd;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--gc-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 176, .13);
}

/* 隐藏 listmonk 的防机器人字段（默认样式会隐藏，这里兜底） */
input.nonce {
  display: none !important;
}

/* ---------- 按钮 ---------- */
.button,
button,
input[type="submit"] {
  display: inline-block;
  background: var(--gc-brand-deep);
  color: #fff !important;
  border: 0;
  border-radius: 9px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .5px;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, transform .06s;
  -webkit-appearance: none;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: #a81f2b;
  color: #fff !important;
  text-decoration: none;
}

.button:active,
button:active {
  transform: translateY(1px);
}

/* 次要按钮（管理订阅页的取消订阅等） */
.button.button-outline,
a.button:not([href*="optin"]) {
  background: #fff;
  color: var(--gc-ink) !important;
  border: 1px solid #d8dde5;
}

/* ---------- 列表选项（多订阅主题） ---------- */
ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

ul li {
  padding: 11px 14px;
  border: 1px solid var(--gc-line);
  border-radius: 10px;
  margin-bottom: 9px;
  color: var(--gc-ink);
  background: #fcfdfe;
  font-size: 15px;
}

/* ---------- 提示与错误 ---------- */
.error,
.error-box,
.alert {
  background: #fff5f5;
  border: 1px solid #f7c9cd;
  border-left: 4px solid var(--gc-brand);
  color: #a81f2b;
  border-radius: 9px;
  padding: 11px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}

/* ---------- 页脚：把 "Powered by listmonk" 整行换成站点说明 ----------
   结构是 <footer class="container">Powered by <a>listmonk</a></footer>
   文本节点无法用选择器命中，所以先把字号压到 0（文本与链接一起消失），
   再用 ::before 以正常字号写回我们自己的文案。 */
footer.container,
.footer {
  font-size: 0;
  text-align: center;
  padding: 0 0 34px;
  line-height: 1.9;
  color: var(--gc-ink-3);
}

footer.container a,
.footer a {
  display: none;
}

footer.container::before,
.footer::before {
  content: "高才香港通 gaocaihk.com · 香港高才通生活指南";
  display: block;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .3px;
  color: var(--gc-ink-3);
}

/* 暂时隐藏「邮件列表存档」链接：目前还没有往期邮件，点进去是空的。
   等第一封周报发出后，删掉这一条即可。 */
a[href*="/archive"] {
  display: none !important;
}

/* ---------- 手机 ---------- */
@media (max-width: 560px) {
  body {
    padding: 0 12px;
    font-size: 15px;
  }
  .wrap {
    padding: 26px 20px 22px;
    margin: 22px auto 14px;
    border-radius: 12px;
  }
  h2 {
    font-size: 20px;
    padding-left: 11px;
    border-left-width: 3px;
  }
  .header .logo img {
    max-height: 40px;
  }
  .button,
  button,
  input[type="submit"] {
    width: 100%;
    padding: 13px 20px;
    text-align: center;
  }
}
